{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "initial_id",
   "metadata": {
    "collapsed": true,
    "ExecuteTime": {
     "end_time": "2024-05-10T06:02:53.637572400Z",
     "start_time": "2024-05-10T06:02:52.751689Z"
    }
   },
   "outputs": [],
   "source": [
    "import re\n",
    "\n",
    "import requests\n",
    "import json\n",
    "import time\n",
    "import pandas as pd\n",
    "\n",
    "\n",
    "headers = {\n",
    "    'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 Edg/116.0.1938.69'\n",
    "}\n",
    "url = 'http://typhoon.nmc.cn/weatherservice/typhoon/jsons/list_2022'\n",
    "params = {\n",
    "    't': int(time.time()*1000),\n",
    "    'callback':'typhoon_jsons_list_2022'\n",
    "}\n",
    "response = requests.get(url,headers=headers,params=params)\n",
    "# data = json.loads(response.content.decode())\n",
    "# data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "outputs": [],
   "source": [
    "data = json.loads(response.text[24:-1])"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-05-10T06:02:53.646538800Z",
     "start_time": "2024-05-10T06:02:53.643569300Z"
    }
   },
   "id": "bc2f82b70a27e046"
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "outputs": [
    {
     "data": {
      "text/plain": "         id      eName cName  aNumber bNumber  cNumber  \\\n0   2831349   nameless  None      NaN           2025.0   \n1   2831287   nameless  None      NaN           2021.0   \n2   2831027   nameless  None      NaN           2013.0   \n3   2830869   nameless  None      NaN           2007.0   \n4   2831430     Pakhar    帕卡   2225.0    2225      NaN   \n5   2831418   Yamaneko    山猫   2224.0    2224      NaN   \n6   2831402     Banyan    榕树   2223.0    2223      NaN   \n7   2831364     Nalgae    尼格   2222.0    2222      NaN   \n8   2831335    Haitang    海棠   2221.0    2221      NaN   \n9   2831311      Nesat    纳沙   2220.0    2220      NaN   \n10  2831301      Sonca    桑卡   2219.0    2219      NaN   \n11  2831255       Roke    洛克   2218.0    2218      NaN   \n12  2831222      Kulap    玫瑰   2217.0    2217      NaN   \n13  2831189       Noru    奥鹿   2216.0    2216      NaN   \n14  2831163      Talas   塔拉斯   2215.0    2215      NaN   \n15  2831131   Nanmadol   南玛都   2214.0    2214      NaN   \n16  2831094     Merbok    苗柏   2213.0    2213      NaN   \n17  2831036      Muifa    梅花   2212.0    2212      NaN   \n18  2830977  Hinnamnor   轩岚诺   2211.0    2211      NaN   \n19  2830952     Tokage    蝎虎   2210.0    2210      NaN   \n20  2830925      Ma-on    马鞍   2209.0    2209      NaN   \n21  2830897      Meari    米雷   2208.0    2208      NaN   \n22  2830879      Mulan    木兰   2207.0    2207      NaN   \n23  2830857     Trases    翠丝   2206.0    2206      NaN   \n24  2830836     Songda    桑达   2205.0    2205      NaN   \n25  2830792       Aere    艾利   2204.0    2204      NaN   \n26  2830735      Chaba    暹芭   2203.0    2203      NaN   \n27  2830721       Megi    鲇鱼   2202.0    2202      NaN   \n28  2830675    Malakas   马勒卡   2201.0    2201      NaN   \n\n                                 text status  \n0                                None   stop  \n1                                None   stop  \n2                                None   stop  \n3                                None   stop  \n4                      生长在湄公河下游的一种淡水鱼   stop  \n5                        在山野生活的一种猫科动物   stop  \n6                          华南地区常见的一种树   stop  \n7                    翅膀的意思，表示飞翔、动感和自由   stop  \n8                             一种花；海棠花   stop  \n9                               捕鱼的意思   stop  \n10                            一种会唱歌的鸟   stop  \n11                   查莫罗（Chamorro）男子名   stop  \n12                             一种花；玫瑰   stop  \n13                            鹿的一种；狍鹿   stop  \n14                                 锐利   stop  \n15       密克罗尼西亚波纳佩岛上的一个著名废墟，有太平洋威尼斯之称   stop  \n16  颈部有斑点的鸽子，常见于郊外和荒地，是马来西亚人喜爱饲养的一种雀鸟   stop  \n17                             一种花；梅花   stop  \n18                       老挝一个国家保护区的名称   stop  \n19                               蝎虎星座   stop  \n20                                山峰名   stop  \n21                                 回声   stop  \n22                      木兰花，一种原产于中国的花   stop  \n23                                啄木鸟   stop  \n24              越南西北部第一大河，沿自我国红河的一个支流   stop  \n25                               一场风暴   stop  \n26                     木槿，一种生长于热带地区的花   stop  \n27                一种在河流或湖泊里常見的鱼，属于鲶鱼类   stop  \n28                              强壮，有力   stop  ",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>id</th>\n      <th>eName</th>\n      <th>cName</th>\n      <th>aNumber</th>\n      <th>bNumber</th>\n      <th>cNumber</th>\n      <th>text</th>\n      <th>status</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>2831349</td>\n      <td>nameless</td>\n      <td>None</td>\n      <td>NaN</td>\n      <td></td>\n      <td>2025.0</td>\n      <td>None</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>2831287</td>\n      <td>nameless</td>\n      <td>None</td>\n      <td>NaN</td>\n      <td></td>\n      <td>2021.0</td>\n      <td>None</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>2831027</td>\n      <td>nameless</td>\n      <td>None</td>\n      <td>NaN</td>\n      <td></td>\n      <td>2013.0</td>\n      <td>None</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>2830869</td>\n      <td>nameless</td>\n      <td>None</td>\n      <td>NaN</td>\n      <td></td>\n      <td>2007.0</td>\n      <td>None</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>2831430</td>\n      <td>Pakhar</td>\n      <td>帕卡</td>\n      <td>2225.0</td>\n      <td>2225</td>\n      <td>NaN</td>\n      <td>生长在湄公河下游的一种淡水鱼</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>5</th>\n      <td>2831418</td>\n      <td>Yamaneko</td>\n      <td>山猫</td>\n      <td>2224.0</td>\n      <td>2224</td>\n      <td>NaN</td>\n      <td>在山野生活的一种猫科动物</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>6</th>\n      <td>2831402</td>\n      <td>Banyan</td>\n      <td>榕树</td>\n      <td>2223.0</td>\n      <td>2223</td>\n      <td>NaN</td>\n      <td>华南地区常见的一种树</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>7</th>\n      <td>2831364</td>\n      <td>Nalgae</td>\n      <td>尼格</td>\n      <td>2222.0</td>\n      <td>2222</td>\n      <td>NaN</td>\n      <td>翅膀的意思，表示飞翔、动感和自由</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>8</th>\n      <td>2831335</td>\n      <td>Haitang</td>\n      <td>海棠</td>\n      <td>2221.0</td>\n      <td>2221</td>\n      <td>NaN</td>\n      <td>一种花；海棠花</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>9</th>\n      <td>2831311</td>\n      <td>Nesat</td>\n      <td>纳沙</td>\n      <td>2220.0</td>\n      <td>2220</td>\n      <td>NaN</td>\n      <td>捕鱼的意思</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>10</th>\n      <td>2831301</td>\n      <td>Sonca</td>\n      <td>桑卡</td>\n      <td>2219.0</td>\n      <td>2219</td>\n      <td>NaN</td>\n      <td>一种会唱歌的鸟</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>11</th>\n      <td>2831255</td>\n      <td>Roke</td>\n      <td>洛克</td>\n      <td>2218.0</td>\n      <td>2218</td>\n      <td>NaN</td>\n      <td>查莫罗（Chamorro）男子名</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>12</th>\n      <td>2831222</td>\n      <td>Kulap</td>\n      <td>玫瑰</td>\n      <td>2217.0</td>\n      <td>2217</td>\n      <td>NaN</td>\n      <td>一种花；玫瑰</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>13</th>\n      <td>2831189</td>\n      <td>Noru</td>\n      <td>奥鹿</td>\n      <td>2216.0</td>\n      <td>2216</td>\n      <td>NaN</td>\n      <td>鹿的一种；狍鹿</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>14</th>\n      <td>2831163</td>\n      <td>Talas</td>\n      <td>塔拉斯</td>\n      <td>2215.0</td>\n      <td>2215</td>\n      <td>NaN</td>\n      <td>锐利</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>15</th>\n      <td>2831131</td>\n      <td>Nanmadol</td>\n      <td>南玛都</td>\n      <td>2214.0</td>\n      <td>2214</td>\n      <td>NaN</td>\n      <td>密克罗尼西亚波纳佩岛上的一个著名废墟，有太平洋威尼斯之称</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>16</th>\n      <td>2831094</td>\n      <td>Merbok</td>\n      <td>苗柏</td>\n      <td>2213.0</td>\n      <td>2213</td>\n      <td>NaN</td>\n      <td>颈部有斑点的鸽子，常见于郊外和荒地，是马来西亚人喜爱饲养的一种雀鸟</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>17</th>\n      <td>2831036</td>\n      <td>Muifa</td>\n      <td>梅花</td>\n      <td>2212.0</td>\n      <td>2212</td>\n      <td>NaN</td>\n      <td>一种花；梅花</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>18</th>\n      <td>2830977</td>\n      <td>Hinnamnor</td>\n      <td>轩岚诺</td>\n      <td>2211.0</td>\n      <td>2211</td>\n      <td>NaN</td>\n      <td>老挝一个国家保护区的名称</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>19</th>\n      <td>2830952</td>\n      <td>Tokage</td>\n      <td>蝎虎</td>\n      <td>2210.0</td>\n      <td>2210</td>\n      <td>NaN</td>\n      <td>蝎虎星座</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>20</th>\n      <td>2830925</td>\n      <td>Ma-on</td>\n      <td>马鞍</td>\n      <td>2209.0</td>\n      <td>2209</td>\n      <td>NaN</td>\n      <td>山峰名</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>21</th>\n      <td>2830897</td>\n      <td>Meari</td>\n      <td>米雷</td>\n      <td>2208.0</td>\n      <td>2208</td>\n      <td>NaN</td>\n      <td>回声</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>22</th>\n      <td>2830879</td>\n      <td>Mulan</td>\n      <td>木兰</td>\n      <td>2207.0</td>\n      <td>2207</td>\n      <td>NaN</td>\n      <td>木兰花，一种原产于中国的花</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>23</th>\n      <td>2830857</td>\n      <td>Trases</td>\n      <td>翠丝</td>\n      <td>2206.0</td>\n      <td>2206</td>\n      <td>NaN</td>\n      <td>啄木鸟</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>24</th>\n      <td>2830836</td>\n      <td>Songda</td>\n      <td>桑达</td>\n      <td>2205.0</td>\n      <td>2205</td>\n      <td>NaN</td>\n      <td>越南西北部第一大河，沿自我国红河的一个支流</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>25</th>\n      <td>2830792</td>\n      <td>Aere</td>\n      <td>艾利</td>\n      <td>2204.0</td>\n      <td>2204</td>\n      <td>NaN</td>\n      <td>一场风暴</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>26</th>\n      <td>2830735</td>\n      <td>Chaba</td>\n      <td>暹芭</td>\n      <td>2203.0</td>\n      <td>2203</td>\n      <td>NaN</td>\n      <td>木槿，一种生长于热带地区的花</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>27</th>\n      <td>2830721</td>\n      <td>Megi</td>\n      <td>鲇鱼</td>\n      <td>2202.0</td>\n      <td>2202</td>\n      <td>NaN</td>\n      <td>一种在河流或湖泊里常見的鱼，属于鲶鱼类</td>\n      <td>stop</td>\n    </tr>\n    <tr>\n      <th>28</th>\n      <td>2830675</td>\n      <td>Malakas</td>\n      <td>马勒卡</td>\n      <td>2201.0</td>\n      <td>2201</td>\n      <td>NaN</td>\n      <td>强壮，有力</td>\n      <td>stop</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "typhoon_list = data.get('typhoonList',[])\n",
    "df = pd.DataFrame(typhoon_list,columns=['id','eName','cName','aNumber','bNumber','cNumber','text','status'])\n",
    "df"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-05-10T06:02:53.675597500Z",
     "start_time": "2024-05-10T06:02:53.647538900Z"
    }
   },
   "id": "9ff531712a3bd3e6"
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "outputs": [
    {
     "data": {
      "text/plain": "[2299664,\n 2299629,\n 2299608,\n 2299575,\n 2299543,\n 2299521,\n 2299477,\n 2299448,\n 2299414,\n 2299382,\n 2299349,\n 2299331,\n 2299308,\n 2299274,\n 2299264,\n 2299231,\n 2299208,\n 2299191,\n 2299173,\n 2299148,\n 2299142,\n 2299099,\n 2299089,\n 2299057,\n 2299017,\n 2299003,\n 2298978,\n 2298959,\n 2298927,\n 2298903,\n 2298883,\n 2298857,\n 2298825,\n 2298803,\n 2298768,\n 2300472,\n 2300423,\n 2300404,\n 2300369,\n 2300312,\n 2300274,\n 2300244,\n 2300212,\n 2300184,\n 2300174,\n 2300148,\n 2300136,\n 2300054,\n 2300028,\n 2299959,\n 2299921,\n 2299880,\n 2299843,\n 2299813,\n 2299799,\n 2299776,\n 2299747,\n 2299736,\n 2299706,\n 2299690,\n 2299679,\n 2754793,\n 2754153,\n 2754765,\n 2754726,\n 2754673,\n 2754635,\n 2754596,\n 2754577,\n 2754540,\n 2754490,\n 2754480,\n 2754456,\n 2754369,\n 2754307,\n 2754252,\n 2754221,\n 2754166,\n 2754085,\n 2754022,\n 2753988,\n 2753934,\n 2753912,\n 2753852,\n 2753796,\n 2753781,\n 2753734,\n 2753691,\n 2753666,\n 2753637,\n 2753571,\n 2752925,\n 2752883,\n 2753602,\n 2753584,\n 2753554,\n 2753522,\n 2753487,\n 2753455,\n 2753427,\n 2753385,\n 2753338,\n 2753308,\n 2753271,\n 2753258,\n 2753223,\n 2753213,\n 2753191,\n 2753177,\n 2753123,\n 2753097,\n 2753076,\n 2753051,\n 2753017,\n 2752985,\n 2752965,\n 2752952,\n 2752936,\n 2752893,\n 2755442,\n 2755428,\n 2754815,\n 2755645,\n 2755604,\n 2755591,\n 2755567,\n 2755545,\n 2755514,\n 2755478,\n 2755452,\n 2755405,\n 2755351,\n 2755334,\n 2755311,\n 2755270,\n 2755248,\n 2755221,\n 2755193,\n 2755162,\n 2755128,\n 2755096,\n 2755061,\n 2755046,\n 2755012,\n 2754929,\n 2754913,\n 2754891,\n 2754869,\n 2754841,\n 2760975,\n 2760585,\n 2760204,\n 2760103,\n 2759784,\n 2760938,\n 2760901,\n 2760893,\n 2760838,\n 2760798,\n 2760744,\n 2760713,\n 2760660,\n 2760613,\n 2760553,\n 2760504,\n 2760459,\n 2760394,\n 2760330,\n 2760308,\n 2760254,\n 2760217,\n 2760141,\n 2760118,\n 2760050,\n 2759996,\n 2759942,\n 2759911,\n 2759878,\n 2759851,\n 2759800,\n 2759751,\n 2759724,\n 2759704,\n 2762512,\n 2762060,\n 2762029,\n 2761962,\n 2762939,\n 2762893,\n 2762867,\n 2762822,\n 2762791,\n 2762762,\n 2762727,\n 2762713,\n 2762682,\n 2762652,\n 2762612,\n 2762574,\n 2762546,\n 2762529,\n 2762474,\n 2762436,\n 2762390,\n 2762365,\n 2762326,\n 2762277,\n 2762214,\n 2762179,\n 2762147,\n 2762125,\n 2762087,\n 2762069,\n 2762041,\n 2761980,\n 2761941,\n 2825104,\n 2825062,\n 2824738,\n 2825283,\n 2825249,\n 2825230,\n 2825190,\n 2825145,\n 2825118,\n 2825073,\n 2825041,\n 2825020,\n 2824965,\n 2824939,\n 2824901,\n 2824882,\n 2824846,\n 2824808,\n 2824778,\n 2824756,\n 2824722,\n 2824692,\n 2824636,\n 2824619,\n 2824593,\n 2824555,\n 2761862,\n 2761538,\n 2761188,\n 2761090,\n 2761902,\n 2761877,\n 2761826,\n 2761780,\n 2761746,\n 2761719,\n 2761660,\n 2761643,\n 2761586,\n 2761551,\n 2761490,\n 2761470,\n 2761437,\n 2761364,\n 2761328,\n 2761285,\n 2761203,\n 2761153,\n 2761136,\n 2761102,\n 2761016,\n 2760989,\n 2831349,\n 2831287,\n 2831027,\n 2830869,\n 2831430,\n 2831418,\n 2831402,\n 2831364,\n 2831335,\n 2831311,\n 2831301,\n 2831255,\n 2831222,\n 2831189,\n 2831163,\n 2831131,\n 2831094,\n 2831036,\n 2830977,\n 2830952,\n 2830925,\n 2830897,\n 2830879,\n 2830857,\n 2830836,\n 2830792,\n 2830735,\n 2830721,\n 2830675,\n 2904917,\n 2923999,\n 2922017,\n 2914859,\n 2905000,\n 2903346,\n 2891823,\n 2886314,\n 2880971,\n 2880117,\n 2875337,\n 2869633,\n 2855442,\n 2848499,\n 2845215,\n 2840439,\n 2827999,\n 2826475,\n 2826395]"
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.read_csv('../static/data/typhoon_list.csv')\n",
    "df['id'].values.tolist()"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-05-10T06:02:53.712799400Z",
     "start_time": "2024-05-10T06:02:53.677597Z"
    }
   },
   "id": "20538e74e0c7b740"
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "outputs": [
    {
     "data": {
      "text/plain": "           id        b             c       datetime level    lng   lat  \\\n0     2299664  2299665    2013111200  1384214400000    TD  126.6   7.5   \n1     2299664  2299666    2013111206  1384236000000    TD  125.7   8.2   \n2     2299664  2299667    2013111212  1384257600000    TD  124.3   9.1   \n3     2299664  2299668    2013111218  1384279200000    TD  121.9   9.7   \n4     2299664  2299669    2013111300  1384300800000    TD  120.1  10.3   \n...       ...      ...           ...            ...   ...    ...   ...   \n9929  2826395  2826446  202304112100  1681246800000    TD  123.5  13.8   \n9930  2826395  2826452  202304120000  1681257600000    TD  123.4  13.8   \n9931  2826395  2826458  202304120300  1681268400000    TD  123.4  13.8   \n9932  2826395  2826463  202304120600  1681279200000    TD  123.3  13.8   \n9933  2826395  2826467  202304120900  1681290000000    TD  123.3  13.8   \n\n      hPa(中心气压)  max_wind_speed move_direction  move_speed   l  \\\n0          1004              13             no           0  []   \n1          1002              13             no           0  []   \n2          1004              13             no           0  []   \n3          1002              15             no           0  []   \n4          1004              15             no           0  []   \n...         ...             ...            ...         ...  ..   \n9929       1004              14            WNW           8  []   \n9930       1004              14            WNW           7  []   \n9931       1004              14            WNW           7  []   \n9932       1004              14            WNW           8  []   \n9933       1004              14            WNW          11  []   \n\n                                                      m    n  \n0                                                   NaN  NaN  \n1                                                   NaN  NaN  \n2                                                   NaN  NaN  \n3                                                   NaN  NaN  \n4                                                   NaN  NaN  \n...                                                 ...  ...  \n9929  {'BABJ': [[12, '202304112100', 122.7, 14, 1002...  NaN  \n9930  {'BABJ': [[12, '202304120000', 122.7, 14, 1002...  NaN  \n9931  {'BABJ': [[12, '202304120300', 122.7, 14, 1002...  NaN  \n9932  {'BABJ': [[12, '202304120600', 122.5, 14.1, 10...  NaN  \n9933  {'BABJ': [[12, '202304120900', 122.2, 14.3, 10...  NaN  \n\n[9934 rows x 14 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>id</th>\n      <th>b</th>\n      <th>c</th>\n      <th>datetime</th>\n      <th>level</th>\n      <th>lng</th>\n      <th>lat</th>\n      <th>hPa(中心气压)</th>\n      <th>max_wind_speed</th>\n      <th>move_direction</th>\n      <th>move_speed</th>\n      <th>l</th>\n      <th>m</th>\n      <th>n</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>2299664</td>\n      <td>2299665</td>\n      <td>2013111200</td>\n      <td>1384214400000</td>\n      <td>TD</td>\n      <td>126.6</td>\n      <td>7.5</td>\n      <td>1004</td>\n      <td>13</td>\n      <td>no</td>\n      <td>0</td>\n      <td>[]</td>\n      <td>NaN</td>\n      <td>NaN</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>2299664</td>\n      <td>2299666</td>\n      <td>2013111206</td>\n      <td>1384236000000</td>\n      <td>TD</td>\n      <td>125.7</td>\n      <td>8.2</td>\n      <td>1002</td>\n      <td>13</td>\n      <td>no</td>\n      <td>0</td>\n      <td>[]</td>\n      <td>NaN</td>\n      <td>NaN</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>2299664</td>\n      <td>2299667</td>\n      <td>2013111212</td>\n      <td>1384257600000</td>\n      <td>TD</td>\n      <td>124.3</td>\n      <td>9.1</td>\n      <td>1004</td>\n      <td>13</td>\n      <td>no</td>\n      <td>0</td>\n      <td>[]</td>\n      <td>NaN</td>\n      <td>NaN</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>2299664</td>\n      <td>2299668</td>\n      <td>2013111218</td>\n      <td>1384279200000</td>\n      <td>TD</td>\n      <td>121.9</td>\n      <td>9.7</td>\n      <td>1002</td>\n      <td>15</td>\n      <td>no</td>\n      <td>0</td>\n      <td>[]</td>\n      <td>NaN</td>\n      <td>NaN</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>2299664</td>\n      <td>2299669</td>\n      <td>2013111300</td>\n      <td>1384300800000</td>\n      <td>TD</td>\n      <td>120.1</td>\n      <td>10.3</td>\n      <td>1004</td>\n      <td>15</td>\n      <td>no</td>\n      <td>0</td>\n      <td>[]</td>\n      <td>NaN</td>\n      <td>NaN</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>9929</th>\n      <td>2826395</td>\n      <td>2826446</td>\n      <td>202304112100</td>\n      <td>1681246800000</td>\n      <td>TD</td>\n      <td>123.5</td>\n      <td>13.8</td>\n      <td>1004</td>\n      <td>14</td>\n      <td>WNW</td>\n      <td>8</td>\n      <td>[]</td>\n      <td>{'BABJ': [[12, '202304112100', 122.7, 14, 1002...</td>\n      <td>NaN</td>\n    </tr>\n    <tr>\n      <th>9930</th>\n      <td>2826395</td>\n      <td>2826452</td>\n      <td>202304120000</td>\n      <td>1681257600000</td>\n      <td>TD</td>\n      <td>123.4</td>\n      <td>13.8</td>\n      <td>1004</td>\n      <td>14</td>\n      <td>WNW</td>\n      <td>7</td>\n      <td>[]</td>\n      <td>{'BABJ': [[12, '202304120000', 122.7, 14, 1002...</td>\n      <td>NaN</td>\n    </tr>\n    <tr>\n      <th>9931</th>\n      <td>2826395</td>\n      <td>2826458</td>\n      <td>202304120300</td>\n      <td>1681268400000</td>\n      <td>TD</td>\n      <td>123.4</td>\n      <td>13.8</td>\n      <td>1004</td>\n      <td>14</td>\n      <td>WNW</td>\n      <td>7</td>\n      <td>[]</td>\n      <td>{'BABJ': [[12, '202304120300', 122.7, 14, 1002...</td>\n      <td>NaN</td>\n    </tr>\n    <tr>\n      <th>9932</th>\n      <td>2826395</td>\n      <td>2826463</td>\n      <td>202304120600</td>\n      <td>1681279200000</td>\n      <td>TD</td>\n      <td>123.3</td>\n      <td>13.8</td>\n      <td>1004</td>\n      <td>14</td>\n      <td>WNW</td>\n      <td>8</td>\n      <td>[]</td>\n      <td>{'BABJ': [[12, '202304120600', 122.5, 14.1, 10...</td>\n      <td>NaN</td>\n    </tr>\n    <tr>\n      <th>9933</th>\n      <td>2826395</td>\n      <td>2826467</td>\n      <td>202304120900</td>\n      <td>1681290000000</td>\n      <td>TD</td>\n      <td>123.3</td>\n      <td>13.8</td>\n      <td>1004</td>\n      <td>14</td>\n      <td>WNW</td>\n      <td>11</td>\n      <td>[]</td>\n      <td>{'BABJ': [[12, '202304120900', 122.2, 14.3, 10...</td>\n      <td>NaN</td>\n    </tr>\n  </tbody>\n</table>\n<p>9934 rows × 14 columns</p>\n</div>"
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.read_csv('../static/data/typhoon_info.csv')\n",
    "df = df.rename(columns={'a':'id','d':'datetime','e':'level','f':'lng','g':'lat','h':'hPa(中心气压)','i':'max_wind_speed','j':'move_direction','k':'move_speed'})\n",
    "level = {'TD':'热带低压','TS':'热带风暴','STS':'强热带风暴','TY':'台风','STY':'强台风','SuperTY':'超强台风'}\n",
    "df"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-05-10T06:02:53.823214700Z",
     "start_time": "2024-05-10T06:02:53.703805700Z"
    }
   },
   "id": "1675a242548a6cfc"
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "outputs": [],
   "source": [
    "df = df.loc[:,['id','datetime','level','lng','lat','hPa(中心气压)','max_wind_speed','move_direction','move_speed']]\n",
    "df['datetime'] = df['datetime'].apply(lambda x:time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(x/1000)))\n",
    "def level_replace(x):\n",
    "    level_str = x\n",
    "    level_str = level.get(level_str,x)\n",
    "    if level_str == x:\n",
    "        for i in level:\n",
    "            level_str = level_str.replace(i,level[i])\n",
    "    return level_str\n",
    "df['level'] = df['level'].apply(lambda x:level_replace(x))\n",
    "df['move_direction'] = df['move_direction'].apply(lambda x:x.replace('N','北').replace('S','南').replace('E','东').replace('W',''))\n",
    "df['move_direction'] = df['move_direction'].apply(lambda x: '无' if (x == 'no' or x == '0' or x == '') else x)\n",
    "df.to_csv('../static/data/typhoon_info_clean.csv',index=False)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-05-10T06:02:53.950873400Z",
     "start_time": "2024-05-10T06:02:53.789234900Z"
    }
   },
   "id": "31ac19919ff7cbe7"
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "outputs": [
    {
     "data": {
      "text/plain": "array(['无', '北', '北北', '南', '南南', '北北东', '北东', '东北东', '东', '南南东', '东南东'],\n      dtype=object)"
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['move_direction'].unique()"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-05-10T06:02:53.951873400Z",
     "start_time": "2024-05-10T06:02:53.937733Z"
    }
   },
   "id": "3ca7102ea33f0674"
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "outputs": [],
   "source": [
    "df = pd.read_csv('../static/data/typhoon_list.csv')\n",
    "df.dropna(axis=0, subset=[\"cName\"], inplace=True)\n",
    "df['text'] = df['text'].apply(lambda x: '' if pd.isnull(x) else x)\n",
    "df['text'] = df['text'].apply(lambda x: x.replace('\\n','').replace('\\r',''))\n",
    "df.to_csv('../static/data/typhoon_list_clean.csv',index=False)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-05-10T06:02:54.003442900Z",
     "start_time": "2024-05-10T06:02:53.951873400Z"
    }
   },
   "id": "ae5a44e5b13aa5d3"
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "outputs": [],
   "source": [
    "df = pd.read_csv('../static/data/typhoon_info_clean.csv')\n",
    "df_list = pd.read_csv('../static/data/typhoon_list.csv')"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-05-10T07:24:53.343512800Z",
     "start_time": "2024-05-10T07:24:53.316255Z"
    }
   },
   "id": "4a4366f91ec856d4"
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "outputs": [
    {
     "data": {
      "text/plain": "{'name': ['海燕', '莫兰蒂', '舒力基', '尼伯特', '威马逊', '玉兔', '天鹅', '鹦鹉', '灿都', '夏浪'],\n 'value': [78, 75, 72, 72, 72, 70, 70, 68, 68, 68]}"
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = df.sort_values(by=['max_wind_speed'], ascending=False).drop_duplicates(['id']).head(10)[\n",
    "        ['id', 'max_wind_speed']].values.tolist()\n",
    "{\n",
    "    'name': [df_list[df_list['id'] == i[0]]['cName'].values.tolist()[0] for i in data],\n",
    "    'value': [i[1] for i in data],\n",
    "\n",
    "}"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-05-10T06:02:54.049234400Z",
     "start_time": "2024-05-10T06:02:54.031053400Z"
    }
   },
   "id": "17252bc999324fd1"
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "outputs": [
    {
     "data": {
      "text/plain": "{'name': ['奥鹿', '基洛', '哈洛拉', '赫克托', '浪卡', '玛娃', '灿鸿', '天鹅', '夏浪', '轩岚诺'],\n 'value': [348.0,\n  270.0,\n  264.0,\n  246.0,\n  246.0,\n  234.0,\n  216.0,\n  210.0,\n  204.0,\n  192.0]}"
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "d = df[df['level'].str.contains('台风')].groupby('id').agg({'datetime':['min','max']}).reset_index()\n",
    "d['time'] = d['datetime']['max'].astype('datetime64[ns]') - d['datetime']['min'].astype('datetime64[ns]')\n",
    "d['time'] = d['time'].apply(lambda x: x/pd.Timedelta(1, 'h'))\n",
    "data = d[['id', 'time']].sort_values(by='time', ascending=False).head(10).values.tolist()\n",
    "{\n",
    "    'name': [df_list[df_list['id'] == i[0]]['cName'].values.tolist()[0] for i in data],\n",
    "    'value': [i[1] for i in data],\n",
    "}"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-05-10T06:02:54.116613200Z",
     "start_time": "2024-05-10T06:02:54.053232200Z"
    }
   },
   "id": "70805f84da2a107f"
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "outputs": [
    {
     "data": {
      "text/plain": "{'name': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],\n 'value': [1, 2, 3, 2, 4, 2, 20, 32, 29, 35, 13, 7]}"
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['month'] = df['datetime'].apply(lambda x: x.split('-')[1])\n",
    "data = df[df['level'].str.contains('台风')].drop_duplicates('id').groupby('month')['id'].count().reset_index().rename(columns={'id':'count'}).sort_values(by='month', ascending=True).values.tolist()\n",
    "{\n",
    "        'name': [int(i[0]) for i in data],\n",
    "        'value': [i[1] for i in data],\n",
    "    }"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-05-10T06:02:54.173067300Z",
     "start_time": "2024-05-10T06:02:54.117612200Z"
    }
   },
   "id": "afc1729db03cd58b"
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "outputs": [
    {
     "data": {
      "text/plain": "[[[1, 975], [1, 975]],\n [[2, 970],\n  [2, 970],\n  [2, 965],\n  [2, 965],\n  [2, 945],\n  [2, 955],\n  [2, 965],\n  [2, 975],\n  [2, 970],\n  [2, 965],\n  [2, 965],\n  [2, 960],\n  [2, 955],\n  [2, 950],\n  [2, 950],\n  [2, 945],\n  [2, 935],\n  [2, 925],\n  [2, 925],\n  [2, 925],\n  [2, 935],\n  [2, 940],\n  [2, 940],\n  [2, 930],\n  [2, 925],\n  [2, 925],\n  [2, 925],\n  [2, 935],\n  [2, 935],\n  [2, 945],\n  [2, 950],\n  [2, 965],\n  [2, 975]],\n [[3, 975],\n  [3, 970],\n  [3, 975],\n  [3, 975],\n  [3, 970],\n  [3, 960],\n  [3, 960],\n  [3, 960],\n  [3, 955],\n  [3, 950],\n  [3, 940],\n  [3, 925],\n  [3, 920],\n  [3, 910],\n  [3, 975],\n  [3, 965],\n  [3, 955],\n  [3, 935],\n  [3, 920],\n  [3, 920],\n  [3, 935],\n  [3, 950],\n  [3, 965]],\n [[4, 910],\n  [4, 915],\n  [4, 920],\n  [4, 935],\n  [4, 940],\n  [4, 940],\n  [4, 940],\n  [4, 945],\n  [4, 950],\n  [4, 955],\n  [4, 960],\n  [4, 965],\n  [4, 970],\n  [4, 970],\n  [4, 975],\n  [4, 970],\n  [4, 965],\n  [4, 955],\n  [4, 945],\n  [4, 935],\n  [4, 915],\n  [4, 895],\n  [4, 895],\n  [4, 895],\n  [4, 905],\n  [4, 915],\n  [4, 915],\n  [4, 915],\n  [4, 930],\n  [4, 935],\n  [4, 940],\n  [4, 940],\n  [4, 940],\n  [4, 940],\n  [4, 940],\n  [4, 940],\n  [4, 940],\n  [4, 945],\n  [4, 950],\n  [4, 950],\n  [4, 950],\n  [4, 955],\n  [4, 960],\n  [4, 975],\n  [4, 975],\n  [4, 965],\n  [4, 955],\n  [4, 955],\n  [4, 945],\n  [4, 945],\n  [4, 945],\n  [4, 940],\n  [4, 940],\n  [4, 950],\n  [4, 955],\n  [4, 960],\n  [4, 965]],\n [[5, 975],\n  [5, 970],\n  [5, 960],\n  [5, 960],\n  [5, 960],\n  [5, 960],\n  [5, 960],\n  [5, 960],\n  [5, 955],\n  [5, 955],\n  [5, 955],\n  [5, 945],\n  [5, 940],\n  [5, 935],\n  [5, 930],\n  [5, 930],\n  [5, 930],\n  [5, 935],\n  [5, 935],\n  [5, 935],\n  [5, 945],\n  [5, 955],\n  [5, 965],\n  [5, 970],\n  [5, 975],\n  [5, 975],\n  [5, 975],\n  [5, 975],\n  [5, 965],\n  [5, 965],\n  [5, 955],\n  [5, 955],\n  [5, 950],\n  [5, 950],\n  [5, 950],\n  [5, 950],\n  [5, 945],\n  [5, 945],\n  [5, 945],\n  [5, 940],\n  [5, 935],\n  [5, 925],\n  [5, 920],\n  [5, 925],\n  [5, 930],\n  [5, 935],\n  [5, 950],\n  [5, 960],\n  [5, 970],\n  [5, 975],\n  [5, 970],\n  [5, 960],\n  [5, 955],\n  [5, 950],\n  [5, 965],\n  [5, 970],\n  [5, 970],\n  [5, 970],\n  [5, 970],\n  [5, 970],\n  [5, 965],\n  [5, 965],\n  [5, 955],\n  [5, 945],\n  [5, 945],\n  [5, 940],\n  [5, 920],\n  [5, 920],\n  [5, 920],\n  [5, 920],\n  [5, 925],\n  [5, 930],\n  [5, 935],\n  [5, 935],\n  [5, 935],\n  [5, 930],\n  [5, 930],\n  [5, 925],\n  [5, 915],\n  [5, 915],\n  [5, 915],\n  [5, 915],\n  [5, 915],\n  [5, 915],\n  [5, 905],\n  [5, 905],\n  [5, 905],\n  [5, 905],\n  [5, 905],\n  [5, 920],\n  [5, 925],\n  [5, 930],\n  [5, 930],\n  [5, 935],\n  [5, 935],\n  [5, 935],\n  [5, 935],\n  [5, 935],\n  [5, 935],\n  [5, 935],\n  [5, 945],\n  [5, 945],\n  [5, 950],\n  [5, 950],\n  [5, 950],\n  [5, 950],\n  [5, 950],\n  [5, 950],\n  [5, 950],\n  [5, 950],\n  [5, 950],\n  [5, 960],\n  [5, 960],\n  [5, 960],\n  [5, 965],\n  [5, 965],\n  [5, 965],\n  [5, 965],\n  [5, 970],\n  [5, 970],\n  [5, 970],\n  [5, 970],\n  [5, 970],\n  [5, 970],\n  [5, 970]],\n [[6, 980],\n  [6, 980],\n  [6, 980],\n  [6, 980],\n  [6, 975],\n  [6, 970],\n  [6, 965],\n  [6, 965],\n  [6, 965],\n  [6, 965],\n  [6, 965],\n  [6, 965],\n  [6, 965],\n  [6, 965],\n  [6, 965],\n  [6, 965],\n  [6, 960],\n  [6, 960],\n  [6, 960],\n  [6, 960],\n  [6, 960],\n  [6, 960],\n  [6, 965],\n  [6, 965],\n  [6, 965],\n  [6, 965],\n  [6, 970],\n  [6, 970],\n  [6, 975]],\n [[7, 975],\n  [7, 965],\n  [7, 955],\n  [7, 945],\n  [7, 935],\n  [7, 935],\n  [7, 935],\n  [7, 935],\n  [7, 935],\n  [7, 940],\n  [7, 945],\n  [7, 945],\n  [7, 950],\n  [7, 950],\n  [7, 950],\n  [7, 950],\n  [7, 960],\n  [7, 975],\n  [7, 975],\n  [7, 970],\n  [7, 970],\n  [7, 970],\n  [7, 970],\n  [7, 970],\n  [7, 970],\n  [7, 970],\n  [7, 970],\n  [7, 965],\n  [7, 960],\n  [7, 955],\n  [7, 955],\n  [7, 960],\n  [7, 975],\n  [7, 970],\n  [7, 960],\n  [7, 960],\n  [7, 945],\n  [7, 930],\n  [7, 940],\n  [7, 960],\n  [7, 975],\n  [7, 970],\n  [7, 965],\n  [7, 960],\n  [7, 950],\n  [7, 930],\n  [7, 920],\n  [7, 900],\n  [7, 888],\n  [7, 910],\n  [7, 935],\n  [7, 945],\n  [7, 970],\n  [7, 975],\n  [7, 970],\n  [7, 965],\n  [7, 955],\n  [7, 950],\n  [7, 945],\n  [7, 945],\n  [7, 940],\n  [7, 940],\n  [7, 930],\n  [7, 930],\n  [7, 930],\n  [7, 935],\n  [7, 935],\n  [7, 935],\n  [7, 935],\n  [7, 940],\n  [7, 950],\n  [7, 965],\n  [7, 970],\n  [7, 970],\n  [7, 965],\n  [7, 965],\n  [7, 965],\n  [7, 965],\n  [7, 970],\n  [7, 975],\n  [7, 975],\n  [7, 975],\n  [7, 970],\n  [7, 965],\n  [7, 965],\n  [7, 965],\n  [7, 965],\n  [7, 965],\n  [7, 965],\n  [7, 955],\n  [7, 955],\n  [7, 955],\n  [7, 960],\n  [7, 960],\n  [7, 965],\n  [7, 970],\n  [7, 975],\n  [7, 975],\n  [7, 975],\n  [7, 965],\n  [7, 955],\n  [7, 950],\n  [7, 940],\n  [7, 930],\n  [7, 930],\n  [7, 940],\n  [7, 940],\n  [7, 935],\n  [7, 930],\n  [7, 930],\n  [7, 930],\n  [7, 915],\n  [7, 915],\n  [7, 930],\n  [7, 935],\n  [7, 940],\n  [7, 945],\n  [7, 950],\n  [7, 955],\n  [7, 960],\n  [7, 960],\n  [7, 960],\n  [7, 960],\n  [7, 960],\n  [7, 960],\n  [7, 955],\n  [7, 955],\n  [7, 955],\n  [7, 955],\n  [7, 955],\n  [7, 955],\n  [7, 955],\n  [7, 955],\n  [7, 955],\n  [7, 955],\n  [7, 955],\n  [7, 960],\n  [7, 965],\n  [7, 970],\n  [7, 975],\n  [7, 975],\n  [7, 965],\n  [7, 955],\n  [7, 955],\n  [7, 970],\n  [7, 975],\n  [7, 975],\n  [7, 975],\n  [7, 970],\n  [7, 970],\n  [7, 970],\n  [7, 970],\n  [7, 970],\n  [7, 965],\n  [7, 960],\n  [7, 960],\n  [7, 955],\n  [7, 950],\n  [7, 940],\n  [7, 940],\n  [7, 935],\n  [7, 940],\n  [7, 945],\n  [7, 950],\n  [7, 955],\n  [7, 960],\n  [7, 970],\n  [7, 975],\n  [7, 960],\n  [7, 940],\n  [7, 915],\n  [7, 905],\n  [7, 895],\n  [7, 895],\n  [7, 895],\n  [7, 895],\n  [7, 895],\n  [7, 895],\n  [7, 915],\n  [7, 950],\n  [7, 965],\n  [7, 975],\n  [7, 975],\n  [7, 970],\n  [7, 965],\n  [7, 960],\n  [7, 960],\n  [7, 960],\n  [7, 960],\n  [7, 960],\n  [7, 965],\n  [7, 975],\n  [7, 975],\n  [7, 975],\n  [7, 975],\n  [7, 975],\n  [7, 965],\n  [7, 960],\n  [7, 960],\n  [7, 960],\n  [7, 960],\n  [7, 960],\n  [7, 960],\n  [7, 965],\n  [7, 970],\n  [7, 970],\n  [7, 970],\n  [7, 970],\n  [7, 970],\n  [7, 970],\n  [7, 970],\n  [7, 970],\n  [7, 975],\n  [7, 975],\n  [7, 975],\n  [7, 975],\n  [7, 975],\n  [7, 970],\n  [7, 955],\n  [7, 935],\n  [7, 935],\n  [7, 935],\n  [7, 935],\n  [7, 975],\n  [7, 970],\n  [7, 965],\n  [7, 955],\n  [7, 955],\n  [7, 955],\n  [7, 960],\n  [7, 965],\n  [7, 970],\n  [7, 975],\n  [7, 965],\n  [7, 945],\n  [7, 925],\n  [7, 925],\n  [7, 925],\n  [7, 930],\n  [7, 935],\n  [7, 935],\n  [7, 935],\n  [7, 935],\n  [7, 935],\n  [7, 925],\n  [7, 925],\n  [7, 925],\n  [7, 925],\n  [7, 925],\n  [7, 930],\n  [7, 935],\n  [7, 940],\n  [7, 940],\n  [7, 945],\n  [7, 945],\n  [7, 945],\n  [7, 950],\n  [7, 950],\n  [7, 955],\n  [7, 960],\n  [7, 965],\n  [7, 965],\n  [7, 965],\n  [7, 960],\n  [7, 975],\n  [7, 965],\n  [7, 965],\n  [7, 965],\n  [7, 965],\n  [7, 965],\n  [7, 972],\n  [7, 978],\n  [7, 975],\n  [7, 970],\n  [7, 965],\n  [7, 955],\n  [7, 955],\n  [7, 955],\n  [7, 955],\n  [7, 955],\n  [7, 955],\n  [7, 955],\n  [7, 955],\n  [7, 965],\n  [7, 965],\n  [7, 965],\n  [7, 965],\n  [7, 965],\n  [7, 965],\n  [7, 965],\n  [7, 965],\n  [7, 965],\n  [7, 968],\n  [7, 968],\n  [7, 968],\n  [7, 968],\n  [7, 970],\n  [7, 970],\n  [7, 965],\n  [7, 960],\n  [7, 960],\n  [7, 965],\n  [7, 970],\n  [7, 965],\n  [7, 960],\n  [7, 960],\n  [7, 960],\n  [7, 955],\n  [7, 945],\n  [7, 940],\n  [7, 935],\n  [7, 935],\n  [7, 935],\n  [7, 975],\n  [7, 970],\n  [7, 965],\n  [7, 965],\n  [7, 960],\n  [7, 955],\n  [7, 945],\n  [7, 945],\n  [7, 945],\n  [7, 935],\n  [7, 930],\n  [7, 930],\n  [7, 925],\n  [7, 915],\n  [7, 915],\n  [7, 915],\n  [7, 915],\n  [7, 920],\n  [7, 925],\n  [7, 925],\n  [7, 925],\n  [7, 925],\n  [7, 930],\n  [7, 930],\n  [7, 930],\n  [7, 930],\n  [7, 935],\n  [7, 935],\n  [7, 935],\n  [7, 935],\n  [7, 935],\n  [7, 935],\n  [7, 935],\n  [7, 935],\n  [7, 935],\n  [7, 935],\n  [7, 935],\n  [7, 935],\n  [7, 940],\n  [7, 940],\n  [7, 940],\n  [7, 940],\n  [7, 940],\n  [7, 940],\n  [7, 940],\n  [7, 940],\n  [7, 940],\n  [7, 940],\n  [7, 940],\n  [7, 940],\n  [7, 935],\n  [7, 935],\n  [7, 935],\n  [7, 930],\n  [7, 930],\n  [7, 930],\n  [7, 925],\n  [7, 925],\n  [7, 925],\n  [7, 925],\n  [7, 925],\n  [7, 925],\n  [7, 930],\n  [7, 930],\n  [7, 930],\n  [7, 935],\n  [7, 935],\n  [7, 945],\n  [7, 960],\n  [7, 970],\n  [7, 970],\n  [7, 980],\n  [7, 985],\n  [7, 970],\n  [7, 970],\n  [7, 970],\n  [7, 970],\n  [7, 965],\n  [7, 965],\n  [7, 960],\n  [7, 960],\n  [7, 960],\n  [7, 960],\n  [7, 960],\n  [7, 960],\n  [7, 960],\n  [7, 960],\n  [7, 960],\n  [7, 965],\n  [7, 975],\n  [7, 975]],\n [[8, 985],\n  [8, 985],\n  [8, 975],\n  [8, 975],\n  [8, 975],\n  [8, 965],\n  [8, 956],\n  [8, 970],\n  [8, 965],\n  [8, 965],\n  [8, 960],\n  [8, 948],\n  [8, 925],\n  [8, 940],\n  [8, 950],\n  [8, 960],\n  [8, 960],\n  [8, 960],\n  [8, 955],\n  [8, 955],\n  [8, 955],\n  [8, 955],\n  [8, 955],\n  [8, 955],\n  [8, 970],\n  [8, 980],\n  [8, 970],\n  [8, 950],\n  [8, 930],\n  [8, 920],\n  [8, 920],\n  [8, 920],\n  [8, 920],\n  [8, 925],\n  [8, 925],\n  [8, 930],\n  [8, 935],\n  [8, 940],\n  [8, 945],\n  [8, 950],\n  [8, 950],\n  [8, 955],\n  [8, 960],\n  [8, 975],\n  [8, 975],\n  [8, 960],\n  [8, 950],\n  [8, 940],\n  [8, 925],\n  [8, 920],\n  [8, 915],\n  [8, 915],\n  [8, 925],\n  [8, 935],\n  [8, 945],\n  [8, 950],\n  [8, 955],\n  [8, 955],\n  [8, 960],\n  [8, 960],\n  [8, 960],\n  [8, 960],\n  [8, 955],\n  [8, 950],\n  [8, 950],\n  [8, 950],\n  [8, 950],\n  [8, 950],\n  [8, 960],\n  [8, 960],\n  [8, 965],\n  [8, 965],\n  [8, 970],\n  [8, 970],\n  [8, 970],\n  [8, 970],\n  [8, 970],\n  [8, 970],\n  [8, 970],\n  [8, 980],\n  [8, 975],\n  [8, 960],\n  [8, 945],\n  [8, 930],\n  [8, 930],\n  [8, 930],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 975],\n  [8, 975],\n  [8, 965],\n  [8, 955],\n  [8, 945],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 935],\n  [8, 935],\n  [8, 930],\n  [8, 920],\n  [8, 920],\n  [8, 920],\n  [8, 930],\n  [8, 935],\n  [8, 940],\n  [8, 945],\n  [8, 945],\n  [8, 950],\n  [8, 955],\n  [8, 955],\n  [8, 955],\n  [8, 960],\n  [8, 960],\n  [8, 960],\n  [8, 960],\n  [8, 965],\n  [8, 970],\n  [8, 975],\n  [8, 975],\n  [8, 965],\n  [8, 955],\n  [8, 935],\n  [8, 935],\n  [8, 935],\n  [8, 935],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 930],\n  [8, 930],\n  [8, 930],\n  [8, 930],\n  [8, 940],\n  [8, 940],\n  [8, 950],\n  [8, 950],\n  [8, 950],\n  [8, 950],\n  [8, 955],\n  [8, 955],\n  [8, 955],\n  [8, 955],\n  [8, 955],\n  [8, 950],\n  [8, 935],\n  [8, 930],\n  [8, 930],\n  [8, 930],\n  [8, 935],\n  [8, 935],\n  [8, 955],\n  [8, 960],\n  [8, 975],\n  [8, 960],\n  [8, 945],\n  [8, 945],\n  [8, 940],\n  [8, 920],\n  [8, 905],\n  [8, 905],\n  [8, 905],\n  [8, 920],\n  [8, 930],\n  [8, 940],\n  [8, 940],\n  [8, 945],\n  [8, 950],\n  [8, 950],\n  [8, 945],\n  [8, 945],\n  [8, 945],\n  [8, 945],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 955],\n  [8, 965],\n  [8, 975],\n  [8, 975],\n  [8, 965],\n  [8, 955],\n  [8, 955],\n  [8, 945],\n  [8, 945],\n  [8, 945],\n  [8, 945],\n  [8, 945],\n  [8, 945],\n  [8, 945],\n  [8, 955],\n  [8, 955],\n  [8, 950],\n  [8, 945],\n  [8, 945],\n  [8, 945],\n  [8, 940],\n  [8, 935],\n  [8, 935],\n  [8, 945],\n  [8, 950],\n  [8, 955],\n  [8, 960],\n  [8, 965],\n  [8, 970],\n  [8, 965],\n  [8, 970],\n  [8, 975],\n  [8, 975],\n  [8, 975],\n  [8, 965],\n  [8, 965],\n  [8, 955],\n  [8, 950],\n  [8, 935],\n  [8, 955],\n  [8, 975],\n  [8, 965],\n  [8, 955],\n  [8, 955],\n  [8, 955],\n  [8, 955],\n  [8, 960],\n  [8, 960],\n  [8, 960],\n  [8, 960],\n  [8, 955],\n  [8, 955],\n  [8, 965],\n  [8, 965],\n  [8, 975],\n  [8, 975],\n  [8, 975],\n  [8, 945],\n  [8, 945],\n  [8, 950],\n  [8, 950],\n  [8, 950],\n  [8, 950],\n  [8, 950],\n  [8, 950],\n  [8, 950],\n  [8, 955],\n  [8, 955],\n  [8, 960],\n  [8, 960],\n  [8, 960],\n  [8, 965],\n  [8, 965],\n  [8, 965],\n  [8, 965],\n  [8, 965],\n  [8, 965],\n  [8, 975],\n  [8, 975],\n  [8, 975],\n  [8, 975],\n  [8, 975],\n  [8, 975],\n  [8, 975],\n  [8, 970],\n  [8, 965],\n  [8, 955],\n  [8, 945],\n  [8, 935],\n  [8, 925],\n  [8, 910],\n  [8, 905],\n  [8, 905],\n  [8, 975],\n  [8, 965],\n  [8, 960],\n  [8, 950],\n  [8, 945],\n  [8, 945],\n  [8, 945],\n  [8, 950],\n  [8, 955],\n  [8, 960],\n  [8, 970],\n  [8, 975],\n  [8, 970],\n  [8, 960],\n  [8, 950],\n  [8, 950],\n  [8, 950],\n  [8, 955],\n  [8, 960],\n  [8, 965],\n  [8, 965],\n  [8, 955],\n  [8, 950],\n  [8, 950],\n  [8, 950],\n  [8, 950],\n  [8, 950],\n  [8, 950],\n  [8, 955],\n  [8, 955],\n  [8, 955],\n  [8, 960],\n  [8, 965],\n  [8, 965],\n  [8, 970],\n  [8, 975],\n  [8, 960],\n  [8, 955],\n  [8, 955],\n  [8, 955],\n  [8, 955],\n  [8, 950],\n  [8, 945],\n  [8, 945],\n  [8, 940],\n  [8, 940],\n  [8, 935],\n  [8, 935],\n  [8, 935],\n  [8, 935],\n  [8, 935],\n  [8, 925],\n  [8, 925],\n  [8, 925],\n  [8, 925],\n  [8, 935],\n  [8, 935],\n  [8, 935],\n  [8, 935],\n  [8, 940],\n  [8, 950],\n  [8, 950],\n  [8, 950],\n  [8, 945],\n  [8, 945],\n  [8, 940],\n  [8, 935],\n  [8, 935],\n  [8, 935],\n  [8, 935],\n  [8, 945],\n  [8, 945],\n  [8, 950],\n  [8, 950],\n  [8, 965],\n  [8, 970],\n  [8, 975],\n  [8, 975],\n  [8, 975],\n  [8, 970],\n  [8, 965],\n  [8, 965],\n  [8, 965],\n  [8, 965],\n  [8, 965],\n  [8, 965],\n  [8, 965],\n  [8, 965],\n  [8, 965],\n  [8, 960],\n  [8, 960],\n  [8, 960],\n  [8, 960],\n  [8, 965],\n  [8, 970],\n  [8, 970],\n  [8, 975],\n  [8, 975],\n  [8, 970],\n  [8, 960],\n  [8, 960],\n  [8, 960],\n  [8, 960],\n  [8, 960],\n  [8, 968],\n  [8, 970],\n  [8, 970],\n  [8, 970],\n  [8, 975],\n  [8, 975],\n  [8, 960],\n  [8, 950],\n  [8, 940],\n  [8, 925],\n  [8, 925],\n  [8, 925],\n  [8, 915],\n  [8, 920],\n  [8, 925],\n  [8, 925],\n  [8, 930],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 935],\n  [8, 930],\n  [8, 960],\n  [8, 970],\n  [8, 970],\n  [8, 965],\n  [8, 975],\n  [8, 965],\n  [8, 965],\n  [8, 955],\n  [8, 955],\n  [8, 955],\n  [8, 950],\n  [8, 945],\n  [8, 975],\n  [8, 970],\n  [8, 970],\n  [8, 965],\n  [8, 960],\n  [8, 960],\n  [8, 955],\n  [8, 955],\n  [8, 955],\n  [8, 950],\n  [8, 950],\n  [8, 955],\n  [8, 965],\n  [8, 980],\n  [8, 975],\n  [8, 980],\n  [8, 970],\n  [8, 965],\n  [8, 965],\n  [8, 965],\n  [8, 970],\n  [8, 965],\n  [8, 950],\n  [8, 935],\n  [8, 930],\n  [8, 920],\n  [8, 915],\n  [8, 915],\n  [8, 915],\n  [8, 920],\n  [8, 925],\n  [8, 975],\n  [8, 965],\n  [8, 955],\n  [8, 955],\n  [8, 955],\n  [8, 960],\n  [8, 965],\n  [8, 975],\n  [8, 975],\n  [8, 975],\n  [8, 970],\n  [8, 970],\n  [8, 975],\n  [8, 975],\n  [8, 965],\n  [8, 965],\n  [8, 960],\n  [8, 945],\n  [8, 940],\n  [8, 940],\n  [8, 930],\n  [8, 930],\n  [8, 930],\n  [8, 930],\n  [8, 935],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 945],\n  [8, 945],\n  [8, 945],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 945],\n  [8, 950],\n  [8, 950],\n  [8, 950],\n  [8, 950],\n  [8, 945],\n  [8, 935],\n  [8, 925],\n  [8, 920],\n  [8, 920],\n  [8, 920],\n  [8, 920],\n  [8, 915],\n  [8, 915],\n  [8, 915],\n  [8, 915],\n  [8, 915],\n  [8, 915],\n  [8, 915],\n  [8, 915],\n  [8, 915],\n  [8, 915],\n  [8, 915],\n  [8, 915],\n  [8, 915],\n  [8, 915],\n  [8, 915],\n  [8, 915],\n  [8, 915],\n  [8, 915],\n  [8, 915],\n  [8, 915],\n  [8, 915],\n  [8, 925],\n  [8, 925],\n  [8, 925],\n  [8, 925],\n  [8, 925],\n  [8, 925],\n  [8, 925],\n  [8, 925],\n  [8, 925],\n  [8, 925],\n  [8, 925],\n  [8, 925],\n  [8, 930],\n  [8, 930],\n  [8, 930],\n  [8, 930],\n  [8, 930],\n  [8, 930],\n  [8, 930],\n  [8, 930],\n  [8, 930],\n  [8, 930],\n  [8, 960],\n  [8, 960],\n  [8, 960],\n  [8, 960],\n  [8, 970],\n  [8, 970],\n  [8, 970],\n  [8, 970],\n  [8, 970],\n  [8, 965],\n  [8, 960],\n  [8, 950],\n  [8, 945],\n  [8, 930],\n  [8, 930],\n  [8, 930],\n  [8, 930],\n  [8, 945],\n  [8, 950],\n  [8, 955],\n  [8, 955],\n  [8, 955],\n  [8, 960],\n  [8, 970],\n  [8, 970],\n  [8, 965],\n  [8, 965],\n  [8, 965],\n  [8, 965],\n  [8, 965],\n  [8, 960],\n  [8, 960],\n  [8, 960],\n  [8, 965],\n  [8, 970],\n  [8, 970],\n  [8, 935],\n  [8, 935],\n  [8, 935],\n  [8, 935],\n  [8, 935],\n  [8, 935],\n  [8, 935],\n  [8, 935],\n  [8, 935],\n  [8, 935],\n  [8, 935],\n  [8, 935],\n  [8, 935],\n  [8, 935],\n  [8, 935],\n  [8, 935],\n  [8, 935],\n  [8, 935],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 940],\n  [8, 945],\n  [8, 945],\n  [8, 945],\n  [8, 950],\n  [8, 950],\n  [8, 950],\n  [8, 950],\n  [8, 950],\n  [8, 950],\n  [8, 955],\n  [8, 955],\n  [8, 955],\n  [8, 955],\n  [8, 955],\n  [8, 955],\n  [8, 955],\n  [8, 955],\n  [8, 955],\n  [8, 955],\n  [8, 955],\n  [8, 955],\n  [8, 960],\n  [8, 960],\n  [8, 960],\n  [8, 960],\n  [8, 960],\n  [8, 960],\n  [8, 965],\n  [8, 965],\n  [8, 965],\n  [8, 965],\n  [8, 965],\n  [8, 965],\n  [8, 970],\n  [8, 970],\n  [8, 970],\n  [8, 975],\n  [8, 975],\n  [8, 975],\n  [8, 975],\n  [8, 975],\n  [8, 975]],\n [[9, 975],\n  [9, 965],\n  [9, 950],\n  [9, 955],\n  [9, 965],\n  [9, 960],\n  [9, 960],\n  [9, 955],\n  [9, 970],\n  [9, 970],\n  [9, 970],\n  [9, 970],\n  [9, 965],\n  [9, 965],\n  [9, 965],\n  [9, 965],\n  [9, 965],\n  [9, 965],\n  [9, 965],\n  [9, 965],\n  [9, 965],\n  [9, 970],\n  [9, 975],\n  [9, 965],\n  [9, 960],\n  [9, 945],\n  [9, 920],\n  [9, 915],\n  [9, 915],\n  [9, 915],\n  [9, 920],\n  [9, 920],\n  [9, 925],\n  [9, 925],\n  [9, 930],\n  [9, 930],\n  [9, 930],\n  [9, 930],\n  [9, 935],\n  [9, 975],\n  [9, 975],\n  [9, 975],\n  [9, 970],\n  [9, 970],\n  [9, 970],\n  [9, 975],\n  [9, 975],\n  [9, 970],\n  [9, 965],\n  [9, 960],\n  [9, 960],\n  [9, 960],\n  [9, 960],\n  [9, 975],\n  [9, 975],\n  [9, 970],\n  [9, 965],\n  [9, 960],\n  [9, 950],\n  [9, 945],\n  [9, 940],\n  [9, 935],\n  [9, 930],\n  [9, 930],\n  [9, 930],\n  [9, 930],\n  [9, 935],\n  [9, 960],\n  [9, 975],\n  [9, 975],\n  [9, 965],\n  [9, 960],\n  [9, 950],\n  [9, 950],\n  [9, 950],\n  [9, 955],\n  [9, 955],\n  [9, 960],\n  [9, 960],\n  [9, 965],\n  [9, 975],\n  [9, 940],\n  [9, 945],\n  [9, 945],\n  [9, 945],\n  [9, 950],\n  [9, 950],\n  [9, 955],\n  [9, 960],\n  [9, 960],\n  [9, 960],\n  [9, 960],\n  [9, 960],\n  [9, 960],\n  [9, 965],\n  [9, 965],\n  [9, 970],\n  [9, 970],\n  [9, 970],\n  [9, 965],\n  [9, 965],\n  [9, 965],\n  [9, 965],\n  [9, 965],\n  [9, 965],\n  [9, 965],\n  [9, 965],\n  [9, 965],\n  [9, 970],\n  [9, 970],\n  [9, 970],\n  [9, 970],\n  [9, 970],\n  [9, 975],\n  [9, 975],\n  [9, 975],\n  [9, 975],\n  [9, 965],\n  [9, 965],\n  [9, 965],\n  [9, 965],\n  [9, 955],\n  [9, 950],\n  [9, 950],\n  [9, 945],\n  [9, 940],\n  [9, 950],\n  [9, 960],\n  [9, 970],\n  [9, 975],\n  [9, 970],\n  [9, 965],\n  [9, 965],\n  [9, 965],\n  [9, 955],\n  [9, 955],\n  [9, 955],\n  [9, 950],\n  [9, 945],\n  [9, 940],\n  [9, 940],\n  [9, 940],\n  [9, 945],\n  [9, 945],\n  [9, 950],\n  [9, 955],\n  [9, 955],\n  [9, 945],\n  [9, 945],\n  [9, 945],\n  [9, 950],\n  [9, 960],\n  [9, 970],\n  [9, 975],\n  [9, 965],\n  [9, 955],\n  [9, 940],\n  [9, 925],\n  [9, 915],\n  [9, 915],\n  [9, 910],\n  [9, 900],\n  [9, 890],\n  [9, 905],\n  [9, 915],\n  [9, 925],\n  [9, 935],\n  [9, 940],\n  [9, 975],\n  [9, 970],\n  [9, 950],\n  [9, 950],\n  [9, 950],\n  [9, 955],\n  [9, 965],\n  [9, 975],\n  [9, 965],\n  [9, 960],\n  [9, 955],\n  [9, 955],\n  [9, 975],\n  [9, 970],\n  [9, 970],\n  [9, 965],\n  [9, 965],\n  [9, 965],\n  [9, 955],\n  [9, 950],\n  [9, 945],\n  [9, 940],\n  [9, 935],\n  [9, 945],\n  [9, 950],\n  [9, 955],\n  [9, 960],\n  [9, 965],\n  [9, 970],\n  [9, 975],\n  [9, 970],\n  [9, 960],\n  [9, 960],\n  [9, 965],\n  [9, 970],\n  [9, 970],\n  [9, 975],\n  [9, 975],\n  [9, 975],\n  [9, 965],\n  [9, 975],\n  [9, 965],\n  [9, 955],\n  [9, 950],\n  [9, 945],\n  [9, 935],\n  [9, 925],\n  [9, 925],\n  [9, 920],\n  [9, 920],\n  [9, 920],\n  [9, 930],\n  [9, 935],\n  [9, 945],\n  [9, 945],\n  [9, 945],\n  [9, 945],\n  [9, 950],\n  [9, 950],\n  [9, 950],\n  [9, 950],\n  [9, 950],\n  [9, 950],\n  [9, 950],\n  [9, 950],\n  [9, 950],\n  [9, 950],\n  [9, 950],\n  [9, 950],\n  [9, 950],\n  [9, 955],\n  [9, 955],\n  [9, 975],\n  [9, 975],\n  [9, 970],\n  [9, 965],\n  [9, 965],\n  [9, 960],\n  [9, 950],\n  [9, 945],\n  [9, 935],\n  [9, 925],\n  [9, 910],\n  [9, 910],\n  [9, 910],\n  [9, 910],\n  [9, 910],\n  [9, 910],\n  [9, 910],\n  [9, 910],\n  [9, 910],\n  [9, 910],\n  [9, 910],\n  [9, 910],\n  [9, 910],\n  [9, 910],\n  [9, 935],\n  [9, 945],\n  [9, 945],\n  [9, 945],\n  [9, 945],\n  [9, 945],\n  [9, 945],\n  [9, 945],\n  [9, 945],\n  [9, 950],\n  [9, 960],\n  [9, 965],\n  [9, 975],\n  [9, 975],\n  [9, 905],\n  [9, 910],\n  [9, 910],\n  [9, 930],\n  [9, 935],\n  [9, 938],\n  [9, 940],\n  [9, 940],\n  [9, 940],\n  [9, 945],\n  [9, 945],\n  [9, 945],\n  [9, 950],\n  [9, 950],\n  [9, 965],\n  [9, 970],\n  [9, 975],\n  [9, 975],\n  [9, 975],\n  [9, 970],\n  [9, 960],\n  [9, 960],\n  [9, 975],\n  [9, 975],\n  [9, 975],\n  [9, 975],\n  [9, 975],\n  [9, 965],\n  [9, 960],\n  [9, 950],\n  [9, 945],\n  [9, 940],\n  [9, 940],\n  [9, 945],\n  [9, 955],\n  [9, 965],\n  [9, 975],\n  [9, 975],\n  [9, 970],\n  [9, 970],\n  [9, 965],\n  [9, 960],\n  [9, 955],\n  [9, 945],\n  [9, 940],\n  [9, 930],\n  [9, 930],\n  [9, 930],\n  [9, 930],\n  [9, 945],\n  [9, 955],\n  [9, 965],\n  [9, 975],\n  [9, 975],\n  [9, 970],\n  [9, 965],\n  [9, 955],\n  [9, 945],\n  [9, 935],\n  [9, 925],\n  [9, 920],\n  [9, 920],\n  [9, 920],\n  [9, 925],\n  [9, 925],\n  [9, 935],\n  [9, 940],\n  [9, 940],\n  [9, 945],\n  [9, 950],\n  [9, 956],\n  [9, 940],\n  [9, 940],\n  [9, 940],\n  [9, 940],\n  [9, 945],\n  [9, 950],\n  [9, 955],\n  [9, 955],\n  [9, 960],\n  [9, 970],\n  [9, 975],\n  [9, 955],\n  [9, 940],\n  [9, 940],\n  [9, 925],\n  [9, 920],\n  [9, 920],\n  [9, 920],\n  [9, 935],\n  [9, 945],\n  [9, 945],\n  [9, 945],\n  [9, 940],\n  [9, 940],\n  [9, 940],\n  [9, 940],\n  [9, 935],\n  [9, 935],\n  [9, 935],\n  [9, 935],\n  [9, 945],\n  [9, 945],\n  [9, 945],\n  [9, 970],\n  [9, 955],\n  [9, 935],\n  [9, 925],\n  [9, 915],\n  [9, 915],\n  [9, 915],\n  [9, 915],\n  [9, 920],\n  [9, 920],\n  [9, 930],\n  [9, 915],\n  [9, 910],\n  [9, 905],\n  [9, 905],\n  [9, 930],\n  [9, 930],\n  [9, 935],\n  [9, 935],\n  [9, 935],\n  [9, 935],\n  [9, 940],\n  [9, 945],\n  [9, 950],\n  [9, 955],\n  [9, 955],\n  [9, 965],\n  [9, 980],\n  [9, 965],\n  [9, 970],\n  [9, 970],\n  [9, 980],\n  [9, 970],\n  [9, 970],\n  [9, 970],\n  [9, 970],\n  [9, 975],\n  [9, 955],\n  [9, 930],\n  [9, 915],\n  [9, 925],\n  [9, 935],\n  [9, 955],\n  [9, 965],\n  [9, 960],\n  [9, 960],\n  [9, 955],\n  [9, 935],\n  [9, 935],\n  [9, 945],\n  [9, 955],\n  [9, 970],\n  [9, 975],\n  [9, 970],\n  [9, 965],\n  [9, 950],\n  [9, 940],\n  [9, 930],\n  [9, 915],\n  [9, 915],\n  [9, 915],\n  [9, 920],\n  [9, 935],\n  [9, 945],\n  [9, 950],\n  [9, 955],\n  [9, 965],\n  [9, 975],\n  [9, 975],\n  [9, 975],\n  [9, 965],\n  [9, 965],\n  [9, 970],\n  [9, 975],\n  [9, 975],\n  [9, 965],\n  [9, 955],\n  [9, 950],\n  [9, 945],\n  [9, 940],\n  [9, 940],\n  [9, 940],\n  [9, 955],\n  [9, 960],\n  [9, 960],\n  [9, 960],\n  [9, 955],\n  [9, 955],\n  [9, 955],\n  [9, 955],\n  [9, 955],\n  [9, 955],\n  [9, 955],\n  [9, 945],\n  [9, 945],\n  [9, 950],\n  [9, 965],\n  [9, 965],\n  [9, 975],\n  [9, 925],\n  [9, 915],\n  [9, 915],\n  [9, 925],\n  [9, 935],\n  [9, 950],\n  [9, 960],\n  [9, 965],\n  [9, 965],\n  [9, 960],\n  [9, 960],\n  [9, 955],\n  [9, 950],\n  [9, 930],\n  [9, 920],\n  [9, 920],\n  [9, 920],\n  [9, 925],\n  [9, 930],\n  [9, 940],\n  [9, 950],\n  [9, 965],\n  [9, 970],\n  [9, 975],\n  [9, 975],\n  [9, 975],\n  [9, 970],\n  [9, 970],\n  [9, 960],\n  [9, 960],\n  [9, 960],\n  [9, 960],\n  [9, 960],\n  [9, 960],\n  [9, 960],\n  [9, 960],\n  [9, 960],\n  [9, 960],\n  [9, 960],\n  [9, 960],\n  [9, 960],\n  [9, 960],\n  [9, 960],\n  [9, 960],\n  [9, 960],\n  [9, 960],\n  [9, 955],\n  [9, 955],\n  [9, 955],\n  [9, 950],\n  [9, 950],\n  [9, 950],\n  [9, 950],\n  [9, 950],\n  [9, 950],\n  [9, 940],\n  [9, 940],\n  [9, 935],\n  [9, 935],\n  [9, 935],\n  [9, 935],\n  [9, 935],\n  [9, 935],\n  [9, 945],\n  [9, 950],\n  [9, 950],\n  [9, 955],\n  [9, 970],\n  [9, 970],\n  [9, 970],\n  [9, 975],\n  [9, 975],\n  [9, 975],\n  [9, 975],\n  [9, 975],\n  [9, 975],\n  [9, 930],\n  [9, 930],\n  [9, 930],\n  [9, 930],\n  [9, 930],\n  [9, 930],\n  [9, 930],\n  [9, 930],\n  [9, 930],\n  [9, 930],\n  [9, 925],\n  [9, 925],\n  [9, 925],\n  [9, 925],\n  [9, 925],\n  [9, 925],\n  [9, 925],\n  [9, 925],\n  [9, 925],\n  [9, 925],\n  [9, 930],\n  [9, 930],\n  [9, 930],\n  [9, 935],\n  [9, 935],\n  [9, 940],\n  [9, 945],\n  [9, 950],\n  [9, 950],\n  [9, 955],\n  [9, 960],\n  [9, 960],\n  [9, 960],\n  [9, 960],\n  [9, 960],\n  [9, 975],\n  [9, 975],\n  [9, 975]],\n [[10, 975],\n  [10, 975],\n  [10, 960],\n  [10, 955],\n  [10, 970],\n  [10, 955],\n  [10, 935],\n  [10, 920],\n  [10, 920],\n  [10, 920],\n  [10, 920],\n  [10, 920],\n  [10, 920],\n  [10, 920],\n  [10, 925],\n  [10, 930],\n  [10, 930],\n  [10, 935],\n  [10, 950],\n  [10, 955],\n  [10, 970],\n  [10, 975],\n  [10, 970],\n  [10, 955],\n  [10, 950],\n  [10, 935],\n  [10, 930],\n  [10, 925],\n  [10, 920],\n  [10, 920],\n  [10, 920],\n  [10, 915],\n  [10, 915],\n  [10, 915],\n  [10, 925],\n  [10, 930],\n  [10, 940],\n  [10, 945],\n  [10, 950],\n  [10, 955],\n  [10, 955],\n  [10, 960],\n  [10, 960],\n  [10, 960],\n  [10, 960],\n  [10, 965],\n  [10, 965],\n  [10, 975],\n  [10, 975],\n  [10, 975],\n  [10, 975],\n  [10, 970],\n  [10, 968],\n  [10, 960],\n  [10, 950],\n  [10, 945],\n  [10, 940],\n  [10, 940],\n  [10, 940],\n  [10, 950],\n  [10, 950],\n  [10, 955],\n  [10, 960],\n  [10, 960],\n  [10, 962],\n  [10, 975],\n  [10, 970],\n  [10, 965],\n  [10, 955],\n  [10, 955],\n  [10, 965],\n  [10, 970],\n  [10, 970],\n  [10, 960],\n  [10, 960],\n  [10, 960],\n  [10, 960],\n  [10, 960],\n  [10, 960],\n  [10, 960],\n  [10, 960],\n  [10, 965],\n  [10, 970],\n  [10, 970],\n  [10, 965],\n  [10, 960],\n  [10, 955],\n  [10, 950],\n  [10, 945],\n  [10, 940],\n  [10, 950],\n  [10, 955],\n  [10, 965],\n  [10, 970],\n  [10, 960],\n  [10, 955],\n  [10, 955],\n  [10, 945],\n  [10, 945],\n  [10, 945],\n  [10, 945],\n  [10, 945],\n  [10, 945],\n  [10, 955],\n  [10, 955],\n  [10, 955],\n  [10, 965],\n  [10, 975],\n  [10, 970],\n  [10, 970],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 955],\n  [10, 945],\n  [10, 935],\n  [10, 910],\n  [10, 900],\n  [10, 900],\n  [10, 900],\n  [10, 900],\n  [10, 910],\n  [10, 915],\n  [10, 920],\n  [10, 925],\n  [10, 930],\n  [10, 935],\n  [10, 938],\n  [10, 938],\n  [10, 942],\n  [10, 950],\n  [10, 950],\n  [10, 950],\n  [10, 955],\n  [10, 960],\n  [10, 975],\n  [10, 970],\n  [10, 960],\n  [10, 950],\n  [10, 950],\n  [10, 950],\n  [10, 950],\n  [10, 950],\n  [10, 950],\n  [10, 950],\n  [10, 940],\n  [10, 940],\n  [10, 940],\n  [10, 950],\n  [10, 950],\n  [10, 950],\n  [10, 955],\n  [10, 960],\n  [10, 965],\n  [10, 970],\n  [10, 975],\n  [10, 975],\n  [10, 965],\n  [10, 960],\n  [10, 960],\n  [10, 960],\n  [10, 955],\n  [10, 945],\n  [10, 935],\n  [10, 935],\n  [10, 940],\n  [10, 945],\n  [10, 950],\n  [10, 950],\n  [10, 950],\n  [10, 955],\n  [10, 955],\n  [10, 960],\n  [10, 960],\n  [10, 960],\n  [10, 960],\n  [10, 960],\n  [10, 950],\n  [10, 950],\n  [10, 950],\n  [10, 950],\n  [10, 955],\n  [10, 960],\n  [10, 960],\n  [10, 965],\n  [10, 975],\n  [10, 975],\n  [10, 965],\n  [10, 960],\n  [10, 955],\n  [10, 950],\n  [10, 945],\n  [10, 940],\n  [10, 935],\n  [10, 935],\n  [10, 945],\n  [10, 955],\n  [10, 965],\n  [10, 975],\n  [10, 975],\n  [10, 975],\n  [10, 975],\n  [10, 975],\n  [10, 965],\n  [10, 950],\n  [10, 945],\n  [10, 935],\n  [10, 975],\n  [10, 975],\n  [10, 965],\n  [10, 960],\n  [10, 950],\n  [10, 940],\n  [10, 925],\n  [10, 920],\n  [10, 920],\n  [10, 915],\n  [10, 905],\n  [10, 905],\n  [10, 905],\n  [10, 910],\n  [10, 920],\n  [10, 940],\n  [10, 950],\n  [10, 955],\n  [10, 955],\n  [10, 955],\n  [10, 955],\n  [10, 970],\n  [10, 970],\n  [10, 960],\n  [10, 950],\n  [10, 935],\n  [10, 955],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 975],\n  [10, 975],\n  [10, 960],\n  [10, 945],\n  [10, 945],\n  [10, 950],\n  [10, 950],\n  [10, 945],\n  [10, 940],\n  [10, 940],\n  [10, 945],\n  [10, 950],\n  [10, 960],\n  [10, 970],\n  [10, 975],\n  [10, 955],\n  [10, 940],\n  [10, 940],\n  [10, 940],\n  [10, 940],\n  [10, 930],\n  [10, 920],\n  [10, 920],\n  [10, 920],\n  [10, 930],\n  [10, 940],\n  [10, 950],\n  [10, 960],\n  [10, 975],\n  [10, 975],\n  [10, 975],\n  [10, 975],\n  [10, 975],\n  [10, 970],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 955],\n  [10, 950],\n  [10, 945],\n  [10, 935],\n  [10, 925],\n  [10, 925],\n  [10, 930],\n  [10, 930],\n  [10, 935],\n  [10, 945],\n  [10, 955],\n  [10, 960],\n  [10, 970],\n  [10, 965],\n  [10, 965],\n  [10, 960],\n  [10, 955],\n  [10, 960],\n  [10, 965],\n  [10, 970],\n  [10, 975],\n  [10, 965],\n  [10, 960],\n  [10, 940],\n  [10, 920],\n  [10, 900],\n  [10, 895],\n  [10, 905],\n  [10, 910],\n  [10, 910],\n  [10, 915],\n  [10, 920],\n  [10, 925],\n  [10, 925],\n  [10, 925],\n  [10, 925],\n  [10, 915],\n  [10, 915],\n  [10, 915],\n  [10, 920],\n  [10, 925],\n  [10, 930],\n  [10, 935],\n  [10, 940],\n  [10, 945],\n  [10, 945],\n  [10, 945],\n  [10, 945],\n  [10, 950],\n  [10, 970],\n  [10, 955],\n  [10, 945],\n  [10, 940],\n  [10, 915],\n  [10, 915],\n  [10, 915],\n  [10, 915],\n  [10, 915],\n  [10, 925],\n  [10, 940],\n  [10, 945],\n  [10, 955],\n  [10, 960],\n  [10, 965],\n  [10, 975],\n  [10, 975],\n  [10, 975],\n  [10, 975],\n  [10, 975],\n  [10, 970],\n  [10, 975],\n  [10, 970],\n  [10, 965],\n  [10, 950],\n  [10, 950],\n  [10, 940],\n  [10, 940],\n  [10, 925],\n  [10, 925],\n  [10, 930],\n  [10, 940],\n  [10, 945],\n  [10, 945],\n  [10, 945],\n  [10, 950],\n  [10, 955],\n  [10, 965],\n  [10, 965],\n  [10, 970],\n  [10, 975],\n  [10, 970],\n  [10, 960],\n  [10, 965],\n  [10, 970],\n  [10, 970],\n  [10, 955],\n  [10, 935],\n  [10, 915],\n  [10, 915],\n  [10, 925],\n  [10, 935],\n  [10, 925],\n  [10, 925],\n  [10, 920],\n  [10, 920],\n  [10, 930],\n  [10, 930],\n  [10, 930],\n  [10, 935],\n  [10, 940],\n  [10, 945],\n  [10, 945],\n  [10, 945],\n  [10, 950],\n  [10, 955],\n  [10, 955],\n  [10, 960],\n  [10, 965],\n  [10, 970],\n  [10, 960],\n  [10, 960],\n  [10, 965],\n  [10, 965],\n  [10, 970],\n  [10, 970],\n  [10, 975],\n  [10, 965],\n  [10, 945],\n  [10, 935],\n  [10, 915],\n  [10, 905],\n  [10, 905],\n  [10, 905],\n  [10, 905],\n  [10, 905],\n  [10, 975],\n  [10, 970],\n  [10, 970],\n  [10, 970],\n  [10, 965],\n  [10, 960],\n  [10, 955],\n  [10, 950],\n  [10, 950],\n  [10, 955],\n  [10, 965],\n  [10, 974],\n  [10, 975],\n  [10, 975],\n  [10, 970],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 975],\n  [10, 975],\n  [10, 970],\n  [10, 970],\n  [10, 970],\n  [10, 970],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 970],\n  [10, 980],\n  [10, 975],\n  [10, 972],\n  [10, 970],\n  [10, 970],\n  [10, 972],\n  [10, 980],\n  [10, 975],\n  [10, 970],\n  [10, 970],\n  [10, 945],\n  [10, 950],\n  [10, 960],\n  [10, 965],\n  [10, 975],\n  [10, 975],\n  [10, 970],\n  [10, 970],\n  [10, 970],\n  [10, 965],\n  [10, 955],\n  [10, 955],\n  [10, 955],\n  [10, 955],\n  [10, 965],\n  [10, 975],\n  [10, 975],\n  [10, 975],\n  [10, 970],\n  [10, 970],\n  [10, 970],\n  [10, 970],\n  [10, 945],\n  [10, 945],\n  [10, 935],\n  [10, 900],\n  [10, 900],\n  [10, 900],\n  [10, 900],\n  [10, 900],\n  [10, 900],\n  [10, 900],\n  [10, 900],\n  [10, 900],\n  [10, 905],\n  [10, 905],\n  [10, 915],\n  [10, 935],\n  [10, 945],\n  [10, 950],\n  [10, 960],\n  [10, 970],\n  [10, 975],\n  [10, 975],\n  [10, 975],\n  [10, 965],\n  [10, 955],\n  [10, 955],\n  [10, 950],\n  [10, 945],\n  [10, 940],\n  [10, 935],\n  [10, 935],\n  [10, 935],\n  [10, 935],\n  [10, 935],\n  [10, 935],\n  [10, 935],\n  [10, 935],\n  [10, 935],\n  [10, 935],\n  [10, 935],\n  [10, 935],\n  [10, 935],\n  [10, 940],\n  [10, 940],\n  [10, 940],\n  [10, 940],\n  [10, 940],\n  [10, 940],\n  [10, 945],\n  [10, 945],\n  [10, 945],\n  [10, 945],\n  [10, 945],\n  [10, 945],\n  [10, 940],\n  [10, 940],\n  [10, 940],\n  [10, 940],\n  [10, 940],\n  [10, 940],\n  [10, 940],\n  [10, 940],\n  [10, 940],\n  [10, 940],\n  [10, 940],\n  [10, 940],\n  [10, 940],\n  [10, 940],\n  [10, 930],\n  [10, 930],\n  [10, 930],\n  [10, 930],\n  [10, 930],\n  [10, 930],\n  [10, 930],\n  [10, 935],\n  [10, 935],\n  [10, 935],\n  [10, 945],\n  [10, 945],\n  [10, 955],\n  [10, 960],\n  [10, 960],\n  [10, 960],\n  [10, 960],\n  [10, 960],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 970],\n  [10, 970],\n  [10, 970],\n  [10, 970],\n  [10, 970],\n  [10, 970],\n  [10, 960],\n  [10, 960],\n  [10, 960],\n  [10, 960],\n  [10, 960],\n  [10, 960],\n  [10, 960],\n  [10, 960],\n  [10, 960],\n  [10, 955],\n  [10, 955],\n  [10, 955],\n  [10, 955],\n  [10, 955],\n  [10, 955],\n  [10, 950],\n  [10, 945],\n  [10, 945],\n  [10, 945],\n  [10, 945],\n  [10, 945],\n  [10, 945],\n  [10, 945],\n  [10, 945],\n  [10, 945],\n  [10, 945],\n  [10, 945],\n  [10, 945],\n  [10, 945],\n  [10, 945],\n  [10, 950],\n  [10, 950],\n  [10, 950],\n  [10, 950],\n  [10, 950],\n  [10, 950],\n  [10, 955],\n  [10, 955],\n  [10, 955],\n  [10, 955],\n  [10, 955],\n  [10, 955],\n  [10, 955],\n  [10, 955],\n  [10, 955],\n  [10, 955],\n  [10, 955],\n  [10, 955],\n  [10, 955],\n  [10, 955],\n  [10, 960],\n  [10, 960],\n  [10, 960],\n  [10, 960],\n  [10, 960],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 965],\n  [10, 975]],\n [[11, 970],\n  [11, 960],\n  [11, 950],\n  [11, 935],\n  [11, 935],\n  [11, 920],\n  [11, 920],\n  [11, 910],\n  [11, 905],\n  [11, 895],\n  [11, 890],\n  [11, 900],\n  [11, 930],\n  [11, 940],\n  [11, 950],\n  [11, 950],\n  [11, 950],\n  [11, 950],\n  [11, 950],\n  [11, 955],\n  [11, 960],\n  [11, 965],\n  [11, 975],\n  [11, 960],\n  [11, 965],\n  [11, 965],\n  [11, 955],\n  [11, 950],\n  [11, 950],\n  [11, 950],\n  [11, 955],\n  [11, 975],\n  [11, 975],\n  [11, 975],\n  [11, 965],\n  [11, 945],\n  [11, 930],\n  [11, 910],\n  [11, 900],\n  [11, 900],\n  [11, 915],\n  [11, 915],\n  [11, 915],\n  [11, 920],\n  [11, 925],\n  [11, 935],\n  [11, 945],\n  [11, 955],\n  [11, 965],\n  [11, 965],\n  [11, 975],\n  [11, 975],\n  [11, 965],\n  [11, 955],\n  [11, 955],\n  [11, 950],\n  [11, 940],\n  [11, 940],\n  [11, 940],\n  [11, 945],\n  [11, 948],\n  [11, 948],\n  [11, 950],\n  [11, 955],\n  [11, 955],\n  [11, 955],\n  [11, 955],\n  [11, 955],\n  [11, 960],\n  [11, 965],\n  [11, 970],\n  [11, 975],\n  [11, 970],\n  [11, 965],\n  [11, 965],\n  [11, 960],\n  [11, 955],\n  [11, 955],\n  [11, 960],\n  [11, 970],\n  [11, 975],\n  [11, 970],\n  [11, 965],\n  [11, 955],\n  [11, 965],\n  [11, 980],\n  [11, 980],\n  [11, 980],\n  [11, 980],\n  [11, 975],\n  [11, 970],\n  [11, 970],\n  [11, 965],\n  [11, 965],\n  [11, 965],\n  [11, 965],\n  [11, 960],\n  [11, 960],\n  [11, 955],\n  [11, 955],\n  [11, 955],\n  [11, 965],\n  [11, 970],\n  [11, 975],\n  [11, 970],\n  [11, 970],\n  [11, 970],\n  [11, 970],\n  [11, 955],\n  [11, 940],\n  [11, 940],\n  [11, 940],\n  [11, 950],\n  [11, 945],\n  [11, 945],\n  [11, 950],\n  [11, 965],\n  [11, 975],\n  [11, 975],\n  [11, 975],\n  [11, 975],\n  [11, 975],\n  [11, 975],\n  [11, 970],\n  [11, 960],\n  [11, 945],\n  [11, 935],\n  [11, 925],\n  [11, 915],\n  [11, 905],\n  [11, 905],\n  [11, 915],\n  [11, 930],\n  [11, 935],\n  [11, 945],\n  [11, 950],\n  [11, 955],\n  [11, 960],\n  [11, 965],\n  [11, 970],\n  [11, 975],\n  [11, 960],\n  [11, 955],\n  [11, 955],\n  [11, 970],\n  [11, 975],\n  [11, 975],\n  [11, 975],\n  [11, 975],\n  [11, 970],\n  [11, 955],\n  [11, 945],\n  [11, 945],\n  [11, 945],\n  [11, 955],\n  [11, 970],\n  [11, 900],\n  [11, 925],\n  [11, 955],\n  [11, 975],\n  [11, 975],\n  [11, 975],\n  [11, 975]],\n [[12, 975],\n  [12, 965],\n  [12, 955],\n  [12, 950],\n  [12, 945],\n  [12, 930],\n  [12, 915],\n  [12, 900],\n  [12, 900],\n  [12, 910],\n  [12, 920],\n  [12, 920],\n  [12, 920],\n  [12, 930],\n  [12, 930],\n  [12, 940],\n  [12, 940],\n  [12, 950],\n  [12, 955],\n  [12, 960],\n  [12, 965],\n  [12, 975],\n  [12, 970],\n  [12, 955],\n  [12, 950],\n  [12, 950],\n  [12, 945],\n  [12, 935],\n  [12, 935],\n  [12, 935],\n  [12, 930],\n  [12, 940],\n  [12, 955],\n  [12, 960],\n  [12, 965],\n  [12, 975],\n  [12, 955],\n  [12, 940],\n  [12, 930],\n  [12, 930],\n  [12, 930],\n  [12, 915],\n  [12, 915],\n  [12, 920],\n  [12, 945],\n  [12, 955],\n  [12, 970],\n  [12, 970],\n  [12, 970],\n  [12, 975],\n  [12, 970],\n  [12, 965],\n  [12, 965],\n  [12, 965],\n  [12, 970],\n  [12, 975],\n  [12, 955],\n  [12, 955],\n  [12, 955],\n  [12, 955],\n  [12, 960],\n  [12, 960],\n  [12, 960],\n  [12, 960],\n  [12, 965],\n  [12, 965],\n  [12, 970],\n  [12, 975],\n  [12, 970],\n  [12, 970],\n  [12, 965],\n  [12, 960],\n  [12, 955],\n  [12, 945],\n  [12, 940],\n  [12, 940],\n  [12, 945],\n  [12, 955],\n  [12, 965],\n  [12, 975],\n  [12, 975],\n  [12, 965],\n  [12, 965],\n  [12, 955],\n  [12, 935],\n  [12, 915],\n  [12, 915],\n  [12, 935],\n  [12, 945],\n  [12, 950],\n  [12, 955],\n  [12, 950],\n  [12, 950],\n  [12, 945],\n  [12, 935],\n  [12, 925],\n  [12, 915],\n  [12, 915],\n  [12, 925],\n  [12, 945],\n  [12, 955],\n  [12, 970],\n  [12, 975],\n  [12, 970],\n  [12, 960],\n  [12, 955],\n  [12, 945],\n  [12, 940],\n  [12, 940],\n  [12, 950],\n  [12, 970]]]"
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "df['month'] = df['datetime'].apply(lambda x: x.split('-')[1]).apply(int)\n",
    "data = [df[(df['level'].str.contains('台风')) & (df['month'] == i)][['hPa(中心气压)']].values.tolist() for i in np.sort(df['month'].unique())]\n",
    "data"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-05-10T06:13:28.020788600Z",
     "start_time": "2024-05-10T06:13:27.850242100Z"
    }
   },
   "id": "737e83eb73682ea9"
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "outputs": [
    {
     "data": {
      "text/plain": "{'data': [{'name': '热带低压', 'value': 21},\n  {'name': '热带风暴', 'value': 78},\n  {'name': '强热带风暴', 'value': 48},\n  {'name': '台风', 'value': 36},\n  {'name': '强台风', 'value': 40},\n  {'name': '超强台风', 'value': 74}]}"
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "level_to_int = {'热带低压':1,'热带风暴':2,'强热带风暴':3,'台风':4,'强台风':5,'超强台风':6}\n",
    "int_to_level = {1:'热带低压',2:'热带风暴',3:'强热带风暴',4:'台风',5:'强台风',6:'超强台风'}\n",
    "df['level_to_int'] = df['level'].apply(lambda x:level_to_int.get(x,-1))\n",
    "data = df.groupby('id')['level_to_int'].max().reset_index().groupby('level_to_int').count().reset_index().values.tolist()\n",
    "{\n",
    "    'data':[{'name':int_to_level.get(i[0]),'value':i[1]}for i in data]\n",
    "}"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-05-10T07:31:49.873737300Z",
     "start_time": "2024-05-10T07:31:49.856748200Z"
    }
   },
   "id": "da52e68066f211a8"
  },
  {
   "cell_type": "markdown",
   "source": [],
   "metadata": {
    "collapsed": false
   },
   "id": "72b5bb8a4c7cb7b3"
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "outputs": [
    {
     "ename": "TypeError",
     "evalue": "'>=' not supported between instances of 'int' and 'str'",
     "output_type": "error",
     "traceback": [
      "\u001B[1;31m---------------------------------------------------------------------------\u001B[0m",
      "\u001B[1;31mNotImplementedError\u001B[0m                       Traceback (most recent call last)",
      "File \u001B[1;32mD:\\Anaconda\\Lib\\site-packages\\pandas\\core\\groupby\\groupby.py:1791\u001B[0m, in \u001B[0;36mGroupBy._cython_agg_general.<locals>.array_func\u001B[1;34m(values)\u001B[0m\n\u001B[0;32m   1790\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[1;32m-> 1791\u001B[0m     result \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mgrouper\u001B[38;5;241m.\u001B[39m_cython_operation(\n\u001B[0;32m   1792\u001B[0m         \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124maggregate\u001B[39m\u001B[38;5;124m\"\u001B[39m,\n\u001B[0;32m   1793\u001B[0m         values,\n\u001B[0;32m   1794\u001B[0m         how,\n\u001B[0;32m   1795\u001B[0m         axis\u001B[38;5;241m=\u001B[39mdata\u001B[38;5;241m.\u001B[39mndim \u001B[38;5;241m-\u001B[39m \u001B[38;5;241m1\u001B[39m,\n\u001B[0;32m   1796\u001B[0m         min_count\u001B[38;5;241m=\u001B[39mmin_count,\n\u001B[0;32m   1797\u001B[0m         \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs,\n\u001B[0;32m   1798\u001B[0m     )\n\u001B[0;32m   1799\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m \u001B[38;5;167;01mNotImplementedError\u001B[39;00m:\n\u001B[0;32m   1800\u001B[0m     \u001B[38;5;66;03m# generally if we have numeric_only=False\u001B[39;00m\n\u001B[0;32m   1801\u001B[0m     \u001B[38;5;66;03m# and non-applicable functions\u001B[39;00m\n\u001B[0;32m   1802\u001B[0m     \u001B[38;5;66;03m# try to python agg\u001B[39;00m\n\u001B[0;32m   1803\u001B[0m     \u001B[38;5;66;03m# TODO: shouldn't min_count matter?\u001B[39;00m\n",
      "File \u001B[1;32mD:\\Anaconda\\Lib\\site-packages\\pandas\\core\\groupby\\ops.py:1039\u001B[0m, in \u001B[0;36mBaseGrouper._cython_operation\u001B[1;34m(self, kind, values, how, axis, min_count, **kwargs)\u001B[0m\n\u001B[0;32m   1038\u001B[0m ngroups \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mngroups\n\u001B[1;32m-> 1039\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m cy_op\u001B[38;5;241m.\u001B[39mcython_operation(\n\u001B[0;32m   1040\u001B[0m     values\u001B[38;5;241m=\u001B[39mvalues,\n\u001B[0;32m   1041\u001B[0m     axis\u001B[38;5;241m=\u001B[39maxis,\n\u001B[0;32m   1042\u001B[0m     min_count\u001B[38;5;241m=\u001B[39mmin_count,\n\u001B[0;32m   1043\u001B[0m     comp_ids\u001B[38;5;241m=\u001B[39mids,\n\u001B[0;32m   1044\u001B[0m     ngroups\u001B[38;5;241m=\u001B[39mngroups,\n\u001B[0;32m   1045\u001B[0m     \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs,\n\u001B[0;32m   1046\u001B[0m )\n",
      "File \u001B[1;32mD:\\Anaconda\\Lib\\site-packages\\pandas\\core\\groupby\\ops.py:708\u001B[0m, in \u001B[0;36mWrappedCythonOp.cython_operation\u001B[1;34m(self, values, axis, min_count, comp_ids, ngroups, **kwargs)\u001B[0m\n\u001B[0;32m    700\u001B[0m     \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_ea_wrap_cython_operation(\n\u001B[0;32m    701\u001B[0m         values,\n\u001B[0;32m    702\u001B[0m         min_count\u001B[38;5;241m=\u001B[39mmin_count,\n\u001B[1;32m   (...)\u001B[0m\n\u001B[0;32m    705\u001B[0m         \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs,\n\u001B[0;32m    706\u001B[0m     )\n\u001B[1;32m--> 708\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_cython_op_ndim_compat(\n\u001B[0;32m    709\u001B[0m     values,\n\u001B[0;32m    710\u001B[0m     min_count\u001B[38;5;241m=\u001B[39mmin_count,\n\u001B[0;32m    711\u001B[0m     ngroups\u001B[38;5;241m=\u001B[39mngroups,\n\u001B[0;32m    712\u001B[0m     comp_ids\u001B[38;5;241m=\u001B[39mcomp_ids,\n\u001B[0;32m    713\u001B[0m     mask\u001B[38;5;241m=\u001B[39m\u001B[38;5;28;01mNone\u001B[39;00m,\n\u001B[0;32m    714\u001B[0m     \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs,\n\u001B[0;32m    715\u001B[0m )\n",
      "File \u001B[1;32mD:\\Anaconda\\Lib\\site-packages\\pandas\\core\\groupby\\ops.py:512\u001B[0m, in \u001B[0;36mWrappedCythonOp._cython_op_ndim_compat\u001B[1;34m(self, values, min_count, ngroups, comp_ids, mask, result_mask, **kwargs)\u001B[0m\n\u001B[0;32m    511\u001B[0m     result_mask \u001B[38;5;241m=\u001B[39m result_mask[\u001B[38;5;28;01mNone\u001B[39;00m, :]\n\u001B[1;32m--> 512\u001B[0m res \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_call_cython_op(\n\u001B[0;32m    513\u001B[0m     values2d,\n\u001B[0;32m    514\u001B[0m     min_count\u001B[38;5;241m=\u001B[39mmin_count,\n\u001B[0;32m    515\u001B[0m     ngroups\u001B[38;5;241m=\u001B[39mngroups,\n\u001B[0;32m    516\u001B[0m     comp_ids\u001B[38;5;241m=\u001B[39mcomp_ids,\n\u001B[0;32m    517\u001B[0m     mask\u001B[38;5;241m=\u001B[39mmask,\n\u001B[0;32m    518\u001B[0m     result_mask\u001B[38;5;241m=\u001B[39mresult_mask,\n\u001B[0;32m    519\u001B[0m     \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs,\n\u001B[0;32m    520\u001B[0m )\n\u001B[0;32m    521\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m res\u001B[38;5;241m.\u001B[39mshape[\u001B[38;5;241m0\u001B[39m] \u001B[38;5;241m==\u001B[39m \u001B[38;5;241m1\u001B[39m:\n",
      "File \u001B[1;32mD:\\Anaconda\\Lib\\site-packages\\pandas\\core\\groupby\\ops.py:571\u001B[0m, in \u001B[0;36mWrappedCythonOp._call_cython_op\u001B[1;34m(self, values, min_count, ngroups, comp_ids, mask, result_mask, **kwargs)\u001B[0m\n\u001B[0;32m    570\u001B[0m out_shape \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_get_output_shape(ngroups, values)\n\u001B[1;32m--> 571\u001B[0m func \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_get_cython_function(\u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mkind, \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mhow, values\u001B[38;5;241m.\u001B[39mdtype, is_numeric)\n\u001B[0;32m    572\u001B[0m values \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_get_cython_vals(values)\n",
      "File \u001B[1;32mD:\\Anaconda\\Lib\\site-packages\\pandas\\core\\groupby\\ops.py:192\u001B[0m, in \u001B[0;36mWrappedCythonOp._get_cython_function\u001B[1;34m(cls, kind, how, dtype, is_numeric)\u001B[0m\n\u001B[0;32m    190\u001B[0m \u001B[38;5;28;01melif\u001B[39;00m \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mobject\u001B[39m\u001B[38;5;124m\"\u001B[39m \u001B[38;5;129;01mnot\u001B[39;00m \u001B[38;5;129;01min\u001B[39;00m f\u001B[38;5;241m.\u001B[39m__signatures__:\n\u001B[0;32m    191\u001B[0m     \u001B[38;5;66;03m# raise NotImplementedError here rather than TypeError later\u001B[39;00m\n\u001B[1;32m--> 192\u001B[0m     \u001B[38;5;28;01mraise\u001B[39;00m \u001B[38;5;167;01mNotImplementedError\u001B[39;00m(\n\u001B[0;32m    193\u001B[0m         \u001B[38;5;124mf\u001B[39m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mfunction is not implemented for this dtype: \u001B[39m\u001B[38;5;124m\"\u001B[39m\n\u001B[0;32m    194\u001B[0m         \u001B[38;5;124mf\u001B[39m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124m[how->\u001B[39m\u001B[38;5;132;01m{\u001B[39;00mhow\u001B[38;5;132;01m}\u001B[39;00m\u001B[38;5;124m,dtype->\u001B[39m\u001B[38;5;132;01m{\u001B[39;00mdtype_str\u001B[38;5;132;01m}\u001B[39;00m\u001B[38;5;124m]\u001B[39m\u001B[38;5;124m\"\u001B[39m\n\u001B[0;32m    195\u001B[0m     )\n\u001B[0;32m    196\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m f\n",
      "\u001B[1;31mNotImplementedError\u001B[0m: function is not implemented for this dtype: [how->max,dtype->object]",
      "\nDuring handling of the above exception, another exception occurred:\n",
      "\u001B[1;31mTypeError\u001B[0m                                 Traceback (most recent call last)",
      "Cell \u001B[1;32mIn[43], line 1\u001B[0m\n\u001B[1;32m----> 1\u001B[0m df\u001B[38;5;241m.\u001B[39mgroupby(\u001B[38;5;124m'\u001B[39m\u001B[38;5;124mid\u001B[39m\u001B[38;5;124m'\u001B[39m)[\u001B[38;5;124m'\u001B[39m\u001B[38;5;124mlevel_to_int\u001B[39m\u001B[38;5;124m'\u001B[39m]\u001B[38;5;241m.\u001B[39mmax()\u001B[38;5;241m.\u001B[39mreset_index()\u001B[38;5;241m.\u001B[39mrename(columns\u001B[38;5;241m=\u001B[39m{\u001B[38;5;124m'\u001B[39m\u001B[38;5;124mlevel_to_int\u001B[39m\u001B[38;5;124m'\u001B[39m:\u001B[38;5;124m'\u001B[39m\u001B[38;5;124mmax_level\u001B[39m\u001B[38;5;124m'\u001B[39m})\n",
      "File \u001B[1;32mD:\\Anaconda\\Lib\\site-packages\\pandas\\core\\groupby\\groupby.py:2509\u001B[0m, in \u001B[0;36mGroupBy.max\u001B[1;34m(self, numeric_only, min_count, engine, engine_kwargs)\u001B[0m\n\u001B[0;32m   2507\u001B[0m     \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_numba_agg_general(sliding_min_max, engine_kwargs, \u001B[38;5;28;01mTrue\u001B[39;00m)\n\u001B[0;32m   2508\u001B[0m \u001B[38;5;28;01melse\u001B[39;00m:\n\u001B[1;32m-> 2509\u001B[0m     \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_agg_general(\n\u001B[0;32m   2510\u001B[0m         numeric_only\u001B[38;5;241m=\u001B[39mnumeric_only,\n\u001B[0;32m   2511\u001B[0m         min_count\u001B[38;5;241m=\u001B[39mmin_count,\n\u001B[0;32m   2512\u001B[0m         alias\u001B[38;5;241m=\u001B[39m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mmax\u001B[39m\u001B[38;5;124m\"\u001B[39m,\n\u001B[0;32m   2513\u001B[0m         npfunc\u001B[38;5;241m=\u001B[39mnp\u001B[38;5;241m.\u001B[39mmax,\n\u001B[0;32m   2514\u001B[0m     )\n",
      "File \u001B[1;32mD:\\Anaconda\\Lib\\site-packages\\pandas\\core\\groupby\\groupby.py:1711\u001B[0m, in \u001B[0;36mGroupBy._agg_general\u001B[1;34m(self, numeric_only, min_count, alias, npfunc)\u001B[0m\n\u001B[0;32m   1699\u001B[0m \u001B[38;5;129m@final\u001B[39m\n\u001B[0;32m   1700\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m \u001B[38;5;21m_agg_general\u001B[39m(\n\u001B[0;32m   1701\u001B[0m     \u001B[38;5;28mself\u001B[39m,\n\u001B[1;32m   (...)\u001B[0m\n\u001B[0;32m   1706\u001B[0m     npfunc: Callable,\n\u001B[0;32m   1707\u001B[0m ):\n\u001B[0;32m   1709\u001B[0m     \u001B[38;5;28;01mwith\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_group_selection_context():\n\u001B[0;32m   1710\u001B[0m         \u001B[38;5;66;03m# try a cython aggregation if we can\u001B[39;00m\n\u001B[1;32m-> 1711\u001B[0m         result \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_cython_agg_general(\n\u001B[0;32m   1712\u001B[0m             how\u001B[38;5;241m=\u001B[39malias,\n\u001B[0;32m   1713\u001B[0m             alt\u001B[38;5;241m=\u001B[39mnpfunc,\n\u001B[0;32m   1714\u001B[0m             numeric_only\u001B[38;5;241m=\u001B[39mnumeric_only,\n\u001B[0;32m   1715\u001B[0m             min_count\u001B[38;5;241m=\u001B[39mmin_count,\n\u001B[0;32m   1716\u001B[0m         )\n\u001B[0;32m   1717\u001B[0m         \u001B[38;5;28;01mreturn\u001B[39;00m result\u001B[38;5;241m.\u001B[39m__finalize__(\u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mobj, method\u001B[38;5;241m=\u001B[39m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mgroupby\u001B[39m\u001B[38;5;124m\"\u001B[39m)\n",
      "File \u001B[1;32mD:\\Anaconda\\Lib\\site-packages\\pandas\\core\\groupby\\groupby.py:1810\u001B[0m, in \u001B[0;36mGroupBy._cython_agg_general\u001B[1;34m(self, how, alt, numeric_only, min_count, ignore_failures, **kwargs)\u001B[0m\n\u001B[0;32m   1806\u001B[0m     \u001B[38;5;28;01mreturn\u001B[39;00m result\n\u001B[0;32m   1808\u001B[0m \u001B[38;5;66;03m# TypeError -> we may have an exception in trying to aggregate\u001B[39;00m\n\u001B[0;32m   1809\u001B[0m \u001B[38;5;66;03m#  continue and exclude the block\u001B[39;00m\n\u001B[1;32m-> 1810\u001B[0m new_mgr \u001B[38;5;241m=\u001B[39m data\u001B[38;5;241m.\u001B[39mgrouped_reduce(array_func, ignore_failures\u001B[38;5;241m=\u001B[39mignore_failures)\n\u001B[0;32m   1812\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m \u001B[38;5;129;01mnot\u001B[39;00m is_ser \u001B[38;5;129;01mand\u001B[39;00m \u001B[38;5;28mlen\u001B[39m(new_mgr) \u001B[38;5;241m<\u001B[39m orig_len:\n\u001B[0;32m   1813\u001B[0m     warn_dropping_nuisance_columns_deprecated(\u001B[38;5;28mtype\u001B[39m(\u001B[38;5;28mself\u001B[39m), how, numeric_only)\n",
      "File \u001B[1;32mD:\\Anaconda\\Lib\\site-packages\\pandas\\core\\internals\\base.py:199\u001B[0m, in \u001B[0;36mSingleDataManager.grouped_reduce\u001B[1;34m(self, func, ignore_failures)\u001B[0m\n\u001B[0;32m    193\u001B[0m \u001B[38;5;250m\u001B[39m\u001B[38;5;124;03m\"\"\"\u001B[39;00m\n\u001B[0;32m    194\u001B[0m \u001B[38;5;124;03mignore_failures : bool, default False\u001B[39;00m\n\u001B[0;32m    195\u001B[0m \u001B[38;5;124;03m    Not used; for compatibility with ArrayManager/BlockManager.\u001B[39;00m\n\u001B[0;32m    196\u001B[0m \u001B[38;5;124;03m\"\"\"\u001B[39;00m\n\u001B[0;32m    198\u001B[0m arr \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39marray\n\u001B[1;32m--> 199\u001B[0m res \u001B[38;5;241m=\u001B[39m func(arr)\n\u001B[0;32m    200\u001B[0m index \u001B[38;5;241m=\u001B[39m default_index(\u001B[38;5;28mlen\u001B[39m(res))\n\u001B[0;32m    202\u001B[0m mgr \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mtype\u001B[39m(\u001B[38;5;28mself\u001B[39m)\u001B[38;5;241m.\u001B[39mfrom_array(res, index)\n",
      "File \u001B[1;32mD:\\Anaconda\\Lib\\site-packages\\pandas\\core\\groupby\\groupby.py:1804\u001B[0m, in \u001B[0;36mGroupBy._cython_agg_general.<locals>.array_func\u001B[1;34m(values)\u001B[0m\n\u001B[0;32m   1791\u001B[0m     result \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mgrouper\u001B[38;5;241m.\u001B[39m_cython_operation(\n\u001B[0;32m   1792\u001B[0m         \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124maggregate\u001B[39m\u001B[38;5;124m\"\u001B[39m,\n\u001B[0;32m   1793\u001B[0m         values,\n\u001B[1;32m   (...)\u001B[0m\n\u001B[0;32m   1797\u001B[0m         \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs,\n\u001B[0;32m   1798\u001B[0m     )\n\u001B[0;32m   1799\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m \u001B[38;5;167;01mNotImplementedError\u001B[39;00m:\n\u001B[0;32m   1800\u001B[0m     \u001B[38;5;66;03m# generally if we have numeric_only=False\u001B[39;00m\n\u001B[0;32m   1801\u001B[0m     \u001B[38;5;66;03m# and non-applicable functions\u001B[39;00m\n\u001B[0;32m   1802\u001B[0m     \u001B[38;5;66;03m# try to python agg\u001B[39;00m\n\u001B[0;32m   1803\u001B[0m     \u001B[38;5;66;03m# TODO: shouldn't min_count matter?\u001B[39;00m\n\u001B[1;32m-> 1804\u001B[0m     result \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_agg_py_fallback(values, ndim\u001B[38;5;241m=\u001B[39mdata\u001B[38;5;241m.\u001B[39mndim, alt\u001B[38;5;241m=\u001B[39malt)\n\u001B[0;32m   1806\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m result\n",
      "File \u001B[1;32mD:\\Anaconda\\Lib\\site-packages\\pandas\\core\\groupby\\groupby.py:1745\u001B[0m, in \u001B[0;36mGroupBy._agg_py_fallback\u001B[1;34m(self, values, ndim, alt)\u001B[0m\n\u001B[0;32m   1740\u001B[0m     ser \u001B[38;5;241m=\u001B[39m df\u001B[38;5;241m.\u001B[39miloc[:, \u001B[38;5;241m0\u001B[39m]\n\u001B[0;32m   1742\u001B[0m \u001B[38;5;66;03m# We do not get here with UDFs, so we know that our dtype\u001B[39;00m\n\u001B[0;32m   1743\u001B[0m \u001B[38;5;66;03m#  should always be preserved by the implemented aggregations\u001B[39;00m\n\u001B[0;32m   1744\u001B[0m \u001B[38;5;66;03m# TODO: Is this exactly right; see WrappedCythonOp get_result_dtype?\u001B[39;00m\n\u001B[1;32m-> 1745\u001B[0m res_values \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mgrouper\u001B[38;5;241m.\u001B[39magg_series(ser, alt, preserve_dtype\u001B[38;5;241m=\u001B[39m\u001B[38;5;28;01mTrue\u001B[39;00m)\n\u001B[0;32m   1747\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m \u001B[38;5;28misinstance\u001B[39m(values, Categorical):\n\u001B[0;32m   1748\u001B[0m     \u001B[38;5;66;03m# Because we only get here with known dtype-preserving\u001B[39;00m\n\u001B[0;32m   1749\u001B[0m     \u001B[38;5;66;03m#  reductions, we cast back to Categorical.\u001B[39;00m\n\u001B[0;32m   1750\u001B[0m     \u001B[38;5;66;03m# TODO: if we ever get \"rank\" working, exclude it here.\u001B[39;00m\n\u001B[0;32m   1751\u001B[0m     res_values \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mtype\u001B[39m(values)\u001B[38;5;241m.\u001B[39m_from_sequence(res_values, dtype\u001B[38;5;241m=\u001B[39mvalues\u001B[38;5;241m.\u001B[39mdtype)\n",
      "File \u001B[1;32mD:\\Anaconda\\Lib\\site-packages\\pandas\\core\\groupby\\ops.py:1081\u001B[0m, in \u001B[0;36mBaseGrouper.agg_series\u001B[1;34m(self, obj, func, preserve_dtype)\u001B[0m\n\u001B[0;32m   1078\u001B[0m     preserve_dtype \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;01mTrue\u001B[39;00m\n\u001B[0;32m   1080\u001B[0m \u001B[38;5;28;01melse\u001B[39;00m:\n\u001B[1;32m-> 1081\u001B[0m     result \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_aggregate_series_pure_python(obj, func)\n\u001B[0;32m   1083\u001B[0m npvalues \u001B[38;5;241m=\u001B[39m lib\u001B[38;5;241m.\u001B[39mmaybe_convert_objects(result, try_float\u001B[38;5;241m=\u001B[39m\u001B[38;5;28;01mFalse\u001B[39;00m)\n\u001B[0;32m   1084\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m preserve_dtype:\n",
      "File \u001B[1;32mD:\\Anaconda\\Lib\\site-packages\\pandas\\core\\groupby\\ops.py:1104\u001B[0m, in \u001B[0;36mBaseGrouper._aggregate_series_pure_python\u001B[1;34m(self, obj, func)\u001B[0m\n\u001B[0;32m   1101\u001B[0m splitter \u001B[38;5;241m=\u001B[39m get_splitter(obj, ids, ngroups, axis\u001B[38;5;241m=\u001B[39m\u001B[38;5;241m0\u001B[39m)\n\u001B[0;32m   1103\u001B[0m \u001B[38;5;28;01mfor\u001B[39;00m i, group \u001B[38;5;129;01min\u001B[39;00m \u001B[38;5;28menumerate\u001B[39m(splitter):\n\u001B[1;32m-> 1104\u001B[0m     res \u001B[38;5;241m=\u001B[39m func(group)\n\u001B[0;32m   1105\u001B[0m     res \u001B[38;5;241m=\u001B[39m libreduction\u001B[38;5;241m.\u001B[39mextract_result(res)\n\u001B[0;32m   1107\u001B[0m     \u001B[38;5;28;01mif\u001B[39;00m \u001B[38;5;129;01mnot\u001B[39;00m initialized:\n\u001B[0;32m   1108\u001B[0m         \u001B[38;5;66;03m# We only do this validation on the first iteration\u001B[39;00m\n",
      "File \u001B[1;32m<__array_function__ internals>:200\u001B[0m, in \u001B[0;36mamax\u001B[1;34m(*args, **kwargs)\u001B[0m\n",
      "File \u001B[1;32mD:\\Anaconda\\Lib\\site-packages\\numpy\\core\\fromnumeric.py:2820\u001B[0m, in \u001B[0;36mamax\u001B[1;34m(a, axis, out, keepdims, initial, where)\u001B[0m\n\u001B[0;32m   2703\u001B[0m \u001B[38;5;129m@array_function_dispatch\u001B[39m(_amax_dispatcher)\n\u001B[0;32m   2704\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m \u001B[38;5;21mamax\u001B[39m(a, axis\u001B[38;5;241m=\u001B[39m\u001B[38;5;28;01mNone\u001B[39;00m, out\u001B[38;5;241m=\u001B[39m\u001B[38;5;28;01mNone\u001B[39;00m, keepdims\u001B[38;5;241m=\u001B[39mnp\u001B[38;5;241m.\u001B[39m_NoValue, initial\u001B[38;5;241m=\u001B[39mnp\u001B[38;5;241m.\u001B[39m_NoValue,\n\u001B[0;32m   2705\u001B[0m          where\u001B[38;5;241m=\u001B[39mnp\u001B[38;5;241m.\u001B[39m_NoValue):\n\u001B[0;32m   2706\u001B[0m \u001B[38;5;250m    \u001B[39m\u001B[38;5;124;03m\"\"\"\u001B[39;00m\n\u001B[0;32m   2707\u001B[0m \u001B[38;5;124;03m    Return the maximum of an array or maximum along an axis.\u001B[39;00m\n\u001B[0;32m   2708\u001B[0m \n\u001B[1;32m   (...)\u001B[0m\n\u001B[0;32m   2818\u001B[0m \u001B[38;5;124;03m    5\u001B[39;00m\n\u001B[0;32m   2819\u001B[0m \u001B[38;5;124;03m    \"\"\"\u001B[39;00m\n\u001B[1;32m-> 2820\u001B[0m     \u001B[38;5;28;01mreturn\u001B[39;00m _wrapreduction(a, np\u001B[38;5;241m.\u001B[39mmaximum, \u001B[38;5;124m'\u001B[39m\u001B[38;5;124mmax\u001B[39m\u001B[38;5;124m'\u001B[39m, axis, \u001B[38;5;28;01mNone\u001B[39;00m, out,\n\u001B[0;32m   2821\u001B[0m                           keepdims\u001B[38;5;241m=\u001B[39mkeepdims, initial\u001B[38;5;241m=\u001B[39minitial, where\u001B[38;5;241m=\u001B[39mwhere)\n",
      "File \u001B[1;32mD:\\Anaconda\\Lib\\site-packages\\numpy\\core\\fromnumeric.py:84\u001B[0m, in \u001B[0;36m_wrapreduction\u001B[1;34m(obj, ufunc, method, axis, dtype, out, **kwargs)\u001B[0m\n\u001B[0;32m     82\u001B[0m             \u001B[38;5;28;01mreturn\u001B[39;00m reduction(axis\u001B[38;5;241m=\u001B[39maxis, dtype\u001B[38;5;241m=\u001B[39mdtype, out\u001B[38;5;241m=\u001B[39mout, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mpasskwargs)\n\u001B[0;32m     83\u001B[0m         \u001B[38;5;28;01melse\u001B[39;00m:\n\u001B[1;32m---> 84\u001B[0m             \u001B[38;5;28;01mreturn\u001B[39;00m reduction(axis\u001B[38;5;241m=\u001B[39maxis, out\u001B[38;5;241m=\u001B[39mout, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mpasskwargs)\n\u001B[0;32m     86\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m ufunc\u001B[38;5;241m.\u001B[39mreduce(obj, axis, dtype, out, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mpasskwargs)\n",
      "File \u001B[1;32mD:\\Anaconda\\Lib\\site-packages\\pandas\\core\\generic.py:11941\u001B[0m, in \u001B[0;36mNDFrame._add_numeric_operations.<locals>.max\u001B[1;34m(self, axis, skipna, level, numeric_only, **kwargs)\u001B[0m\n\u001B[0;32m  11921\u001B[0m \u001B[38;5;129m@doc\u001B[39m(\n\u001B[0;32m  11922\u001B[0m     _num_doc,\n\u001B[0;32m  11923\u001B[0m     desc\u001B[38;5;241m=\u001B[39m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mReturn the maximum of the values over the requested axis.\u001B[39m\u001B[38;5;130;01m\\n\u001B[39;00m\u001B[38;5;130;01m\\n\u001B[39;00m\u001B[38;5;124m\"\u001B[39m\n\u001B[1;32m   (...)\u001B[0m\n\u001B[0;32m  11939\u001B[0m     \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs,\n\u001B[0;32m  11940\u001B[0m ):\n\u001B[1;32m> 11941\u001B[0m     \u001B[38;5;28;01mreturn\u001B[39;00m NDFrame\u001B[38;5;241m.\u001B[39mmax(\u001B[38;5;28mself\u001B[39m, axis, skipna, level, numeric_only, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs)\n",
      "File \u001B[1;32mD:\\Anaconda\\Lib\\site-packages\\pandas\\core\\generic.py:11383\u001B[0m, in \u001B[0;36mNDFrame.max\u001B[1;34m(self, axis, skipna, level, numeric_only, **kwargs)\u001B[0m\n\u001B[0;32m  11375\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m \u001B[38;5;21mmax\u001B[39m(\n\u001B[0;32m  11376\u001B[0m     \u001B[38;5;28mself\u001B[39m,\n\u001B[0;32m  11377\u001B[0m     axis: Axis \u001B[38;5;241m|\u001B[39m \u001B[38;5;28;01mNone\u001B[39;00m \u001B[38;5;241m|\u001B[39m lib\u001B[38;5;241m.\u001B[39mNoDefault \u001B[38;5;241m=\u001B[39m lib\u001B[38;5;241m.\u001B[39mno_default,\n\u001B[1;32m   (...)\u001B[0m\n\u001B[0;32m  11381\u001B[0m     \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs,\n\u001B[0;32m  11382\u001B[0m ):\n\u001B[1;32m> 11383\u001B[0m     \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_stat_function(\n\u001B[0;32m  11384\u001B[0m         \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mmax\u001B[39m\u001B[38;5;124m\"\u001B[39m,\n\u001B[0;32m  11385\u001B[0m         nanops\u001B[38;5;241m.\u001B[39mnanmax,\n\u001B[0;32m  11386\u001B[0m         axis,\n\u001B[0;32m  11387\u001B[0m         skipna,\n\u001B[0;32m  11388\u001B[0m         level,\n\u001B[0;32m  11389\u001B[0m         numeric_only,\n\u001B[0;32m  11390\u001B[0m         \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs,\n\u001B[0;32m  11391\u001B[0m     )\n",
      "File \u001B[1;32mD:\\Anaconda\\Lib\\site-packages\\pandas\\core\\generic.py:11353\u001B[0m, in \u001B[0;36mNDFrame._stat_function\u001B[1;34m(self, name, func, axis, skipna, level, numeric_only, **kwargs)\u001B[0m\n\u001B[0;32m  11343\u001B[0m     warnings\u001B[38;5;241m.\u001B[39mwarn(\n\u001B[0;32m  11344\u001B[0m         \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mUsing the level keyword in DataFrame and Series aggregations is \u001B[39m\u001B[38;5;124m\"\u001B[39m\n\u001B[0;32m  11345\u001B[0m         \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mdeprecated and will be removed in a future version. Use groupby \u001B[39m\u001B[38;5;124m\"\u001B[39m\n\u001B[1;32m   (...)\u001B[0m\n\u001B[0;32m  11348\u001B[0m         stacklevel\u001B[38;5;241m=\u001B[39mfind_stack_level(),\n\u001B[0;32m  11349\u001B[0m     )\n\u001B[0;32m  11350\u001B[0m     \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_agg_by_level(\n\u001B[0;32m  11351\u001B[0m         name, axis\u001B[38;5;241m=\u001B[39maxis, level\u001B[38;5;241m=\u001B[39mlevel, skipna\u001B[38;5;241m=\u001B[39mskipna, numeric_only\u001B[38;5;241m=\u001B[39mnumeric_only\n\u001B[0;32m  11352\u001B[0m     )\n\u001B[1;32m> 11353\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_reduce(\n\u001B[0;32m  11354\u001B[0m     func, name\u001B[38;5;241m=\u001B[39mname, axis\u001B[38;5;241m=\u001B[39maxis, skipna\u001B[38;5;241m=\u001B[39mskipna, numeric_only\u001B[38;5;241m=\u001B[39mnumeric_only\n\u001B[0;32m  11355\u001B[0m )\n",
      "File \u001B[1;32mD:\\Anaconda\\Lib\\site-packages\\pandas\\core\\series.py:4816\u001B[0m, in \u001B[0;36mSeries._reduce\u001B[1;34m(self, op, name, axis, skipna, numeric_only, filter_type, **kwds)\u001B[0m\n\u001B[0;32m   4812\u001B[0m     \u001B[38;5;28;01mraise\u001B[39;00m \u001B[38;5;167;01mNotImplementedError\u001B[39;00m(\n\u001B[0;32m   4813\u001B[0m         \u001B[38;5;124mf\u001B[39m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mSeries.\u001B[39m\u001B[38;5;132;01m{\u001B[39;00mname\u001B[38;5;132;01m}\u001B[39;00m\u001B[38;5;124m does not implement \u001B[39m\u001B[38;5;132;01m{\u001B[39;00mkwd_name\u001B[38;5;132;01m}\u001B[39;00m\u001B[38;5;124m.\u001B[39m\u001B[38;5;124m\"\u001B[39m\n\u001B[0;32m   4814\u001B[0m     )\n\u001B[0;32m   4815\u001B[0m \u001B[38;5;28;01mwith\u001B[39;00m np\u001B[38;5;241m.\u001B[39merrstate(\u001B[38;5;28mall\u001B[39m\u001B[38;5;241m=\u001B[39m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mignore\u001B[39m\u001B[38;5;124m\"\u001B[39m):\n\u001B[1;32m-> 4816\u001B[0m     \u001B[38;5;28;01mreturn\u001B[39;00m op(delegate, skipna\u001B[38;5;241m=\u001B[39mskipna, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwds)\n",
      "File \u001B[1;32mD:\\Anaconda\\Lib\\site-packages\\pandas\\core\\nanops.py:155\u001B[0m, in \u001B[0;36mbottleneck_switch.__call__.<locals>.f\u001B[1;34m(values, axis, skipna, **kwds)\u001B[0m\n\u001B[0;32m    153\u001B[0m         result \u001B[38;5;241m=\u001B[39m alt(values, axis\u001B[38;5;241m=\u001B[39maxis, skipna\u001B[38;5;241m=\u001B[39mskipna, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwds)\n\u001B[0;32m    154\u001B[0m \u001B[38;5;28;01melse\u001B[39;00m:\n\u001B[1;32m--> 155\u001B[0m     result \u001B[38;5;241m=\u001B[39m alt(values, axis\u001B[38;5;241m=\u001B[39maxis, skipna\u001B[38;5;241m=\u001B[39mskipna, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwds)\n\u001B[0;32m    157\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m result\n",
      "File \u001B[1;32mD:\\Anaconda\\Lib\\site-packages\\pandas\\core\\nanops.py:418\u001B[0m, in \u001B[0;36m_datetimelike_compat.<locals>.new_func\u001B[1;34m(values, axis, skipna, mask, **kwargs)\u001B[0m\n\u001B[0;32m    415\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m datetimelike \u001B[38;5;129;01mand\u001B[39;00m mask \u001B[38;5;129;01mis\u001B[39;00m \u001B[38;5;28;01mNone\u001B[39;00m:\n\u001B[0;32m    416\u001B[0m     mask \u001B[38;5;241m=\u001B[39m isna(values)\n\u001B[1;32m--> 418\u001B[0m result \u001B[38;5;241m=\u001B[39m func(values, axis\u001B[38;5;241m=\u001B[39maxis, skipna\u001B[38;5;241m=\u001B[39mskipna, mask\u001B[38;5;241m=\u001B[39mmask, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs)\n\u001B[0;32m    420\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m datetimelike:\n\u001B[0;32m    421\u001B[0m     result \u001B[38;5;241m=\u001B[39m _wrap_results(result, orig_values\u001B[38;5;241m.\u001B[39mdtype, fill_value\u001B[38;5;241m=\u001B[39miNaT)\n",
      "File \u001B[1;32mD:\\Anaconda\\Lib\\site-packages\\pandas\\core\\nanops.py:1051\u001B[0m, in \u001B[0;36m_nanminmax.<locals>.reduction\u001B[1;34m(values, axis, skipna, mask)\u001B[0m\n\u001B[0;32m   1049\u001B[0m         result \u001B[38;5;241m=\u001B[39m np\u001B[38;5;241m.\u001B[39mnan\n\u001B[0;32m   1050\u001B[0m \u001B[38;5;28;01melse\u001B[39;00m:\n\u001B[1;32m-> 1051\u001B[0m     result \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mgetattr\u001B[39m(values, meth)(axis)\n\u001B[0;32m   1053\u001B[0m result \u001B[38;5;241m=\u001B[39m _maybe_null_out(result, axis, mask, values\u001B[38;5;241m.\u001B[39mshape)\n\u001B[0;32m   1054\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m result\n",
      "File \u001B[1;32mD:\\Anaconda\\Lib\\site-packages\\numpy\\core\\_methods.py:41\u001B[0m, in \u001B[0;36m_amax\u001B[1;34m(a, axis, out, keepdims, initial, where)\u001B[0m\n\u001B[0;32m     39\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m \u001B[38;5;21m_amax\u001B[39m(a, axis\u001B[38;5;241m=\u001B[39m\u001B[38;5;28;01mNone\u001B[39;00m, out\u001B[38;5;241m=\u001B[39m\u001B[38;5;28;01mNone\u001B[39;00m, keepdims\u001B[38;5;241m=\u001B[39m\u001B[38;5;28;01mFalse\u001B[39;00m,\n\u001B[0;32m     40\u001B[0m           initial\u001B[38;5;241m=\u001B[39m_NoValue, where\u001B[38;5;241m=\u001B[39m\u001B[38;5;28;01mTrue\u001B[39;00m):\n\u001B[1;32m---> 41\u001B[0m     \u001B[38;5;28;01mreturn\u001B[39;00m umr_maximum(a, axis, \u001B[38;5;28;01mNone\u001B[39;00m, out, keepdims, initial, where)\n",
      "\u001B[1;31mTypeError\u001B[0m: '>=' not supported between instances of 'int' and 'str'"
     ]
    }
   ],
   "source": [],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-05-10T07:25:07.059966600Z",
     "start_time": "2024-05-10T07:25:06.657007Z"
    }
   },
   "id": "9aa5716b3022f965"
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
